PageRenderTime 26ms queryFilters 16ms Sphinxql 520ms GetByIds 135ms meta 0ms repositoryFilters 12ms languageFilters 10ms sourceFilters 2ms

1,422,939 results for 'socket repo:yawaramin/swifter' (26 ms)

Source

Language

Repository

poll.socket.Rd https://github.com/brotchie/rzmq.git | Unknown | 101 lines
26\seealso{
27  \code{\link{connect.socket},\link{bind.socket},\link{receive.socket},\link{send.socket},\link{poll.socket}}
28}
42# Poll the REP and REQ sockets for all events.
43events <- poll.socket(list(in.socket, out.socket),
44                      list(c("read", "write", "error"),
58
59events <- poll.socket(list(in.socket, out.socket),
60                      list(c("read", "write", "error"),
71
72events <- poll.socket(list(in.socket, out.socket),
73                      list(c("read", "write", "error"),
84
85events <- poll.socket(list(in.socket, out.socket),
86                      list(c("read", "write", "error"),
socket.c https://github.com/ia/connect.git | C | 686 lines
345/* send-whole-buffer routine */
346int cnct_socket_send(cnct_socket_t *socket, char *msg, int len)
347{
368/* connect - send - close */
369int cnct_socket_sendmsg(cnct_socket_t *socket, char *msg, int len)
370{
488/* recv-whole-buffer routine */
489int cnct_socket_recv(cnct_socket_t *socket, socket_t sd, char *msg, int len)
490{
532/* listen - accept - recv - close */
533int cnct_socket_recvmsg(cnct_socket_t *socket, char *msg, int len)
534{
588/* init server for processing accepted connections in callback */
589int cnct_socket_server(cnct_socket_t *socket, int (*callback)(cnct_socket_t *, socket_t, struct sockaddr_storage, cnct_sockdata_t))
590{
068-socket-keepalive.t https://github.com/npk/lua-nginx-module.git | Unknown | 965 lines
3use lib 'lib';
4use Test::Nginx::Socket;
5
47function go(port)
48    local sock = ngx.socket.tcp()
49    local ok, err = sock:connect("127.0.0.1", port)
89["[error]",
90"lua socket keepalive: free connection pool for "]
91--- error_log eval
91--- error_log eval
92qq{lua socket get keepalive peer: using connection
93lua socket keepalive create connection pool for key "127.0.0.1:$ENV{TEST_NGINX_MEMCACHED_PORT}"
117function go(port, keepalive)
118    local sock = ngx.socket.tcp()
119    local ok, err = sock:connect("127.0.0.1", port)
socket-keepalive.t https://github.com/npk/lua-nginx-module.git | Unknown | 988 lines
3use lib 'lib';
4use Test::Nginx::Socket;
5
49function go(port)
50    local sock = ngx.socket.tcp()
51    local ok, err = sock:connect("127.0.0.1", port)
91["[error]",
92"lua socket keepalive: free connection pool for "]
93--- error_log eval
93--- error_log eval
94qq{lua socket get keepalive peer: using connection
95lua socket keepalive create connection pool for key "127.0.0.1:$ENV{TEST_NGINX_MEMCACHED_PORT}"
121function go(port, keepalive)
122    local sock = ngx.socket.tcp()
123    local ok, err = sock:connect("127.0.0.1", port)
socket.hh https://github.com/bhesmans/click.git | C++ Header | 248 lines
1// -*- mode: c++; c-basic-offset: 2 -*-
2#ifndef CLICK_SOCKET_HH
3#define CLICK_SOCKET_HH
17Socket("UDP", IP, PORTNUMBER [, LOCALIP] [, LOCALPORTNUMBER] [, I<KEYWORDS>])
18Socket("UNIX", FILENAME [, LOCALFILENAME] [, I<KEYWORDS>])
19Socket("UNIX_DGRAM", FILENAME [, LOCALFILENAME] [, I<KEYWORDS>])
27Transports packets over various types of sockets. Packets do not flow
28through Socket elements (i.e., Socket is an "x/y" element). Instead,
29input packets are sent to a remote host or process, and packets
111The name of an IPRouteTable element, like RadixIPLookup or
112DirectIPLookup. If set and the Socket element is a server, the Socket
113element will lookup source IP addresses of clients in the specified
121The name of an IPRouteTable element, like RadixIPLookup or
122DirectIPLookup. If set and the Socket element is a server, the Socket
123element will lookup source IP addresses of clients in the specified
nixio.Socket.lua https://github.com/eins78/luci.git | Lua | 170 lines
1--- Socket Object.
2-- Supports IPv4, IPv6 and UNIX (POSIX only) families.
3-- @cstyle	instance
4module "nixio.Socket"
5
5
6--- Get the local address of a socket.
7-- @class function
7-- @class function
8-- @name Socket.getsockname
9-- @return	IP-Address
11
12--- Get the peer address of a socket.
13-- @class function
13-- @class function
14-- @name Socket.getpeername
15-- @return	IP-Address
socket.c https://bitbucket.org/markotibold/pyzmq-static | C | 10,426 lines
3440static PyObject *__pyx_pf_3zmq_4core_6socket_6Socket_7bind(PyObject *__pyx_v_self, PyObject *__pyx_v_addr); /*proto*/
3441static char __pyx_doc_3zmq_4core_6socket_6Socket_7bind[] = "s.bind(addr)\n\n        Bind the socket to an address.\n\n        This causes the socket to listen on a network port. Sockets on the\n        other side of this connection will use ``Socket.connect(addr)`` to\n        connect to this socket.\n\n        Parameters\n        ----------\n        addr : str\n            The address string. This has the form 'protocol://interface:port',\n            for example 'tcp://127.0.0.1:5555'. Protocols supported are\n            tcp, upd, pgm, inproc and ipc. If the address is unicode, it is\n            encoded to utf-8 first.\n        ";
3442static PyObject *__pyx_pf_3zmq_4core_6socket_6Socket_7bind(PyObject *__pyx_v_self, PyObject *__pyx_v_addr) {
4581static PyObject *__pyx_pf_3zmq_4core_6socket_6Socket_11recv(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
4582static  PyObject *__pyx_f_3zmq_4core_6socket_6Socket_recv(struct __pyx_obj_3zmq_4core_6socket_Socket *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_3zmq_4core_6socket_6Socket_recv *__pyx_optional_args) {
4583  int __pyx_v_flags = ((int)0);
8037static struct PyGetSetDef __pyx_getsets_3zmq_4core_6socket_Socket[] = {
8038  {(char *)"socket_type", __pyx_getprop_3zmq_4core_6socket_6Socket_socket_type, __pyx_setprop_3zmq_4core_6socket_6Socket_socket_type, 0, 0},
8039  {(char *)"context", __pyx_getprop_3zmq_4core_6socket_6Socket_context, __pyx_setprop_3zmq_4core_6socket_6Socket_context, 0, 0},
8166  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
8167  __Pyx_DOCSTR("Socket(context, socket_type)\n\n    A 0MQ socket.\n\n    These objects will generally be constructed via the socket() method of a Context object.\n    \n    Parameters\n    ----------\n    context : Context\n        The 0MQ Context this Socket belongs to.\n    socket_type : int\n        The socket type, which can be any of the 0MQ socket types: \n        REQ, REP, PUB, SUB, PAIR, XREQ, XREP, PULL, PUSH, XPUB, XSUB.\n    \n    See Also\n    --------\n    .Context.socket : method for creating a socket bound to a Context.\n    "), /*tp_doc*/
8168  __pyx_tp_traverse_3zmq_4core_6socket_Socket, /*tp_traverse*/
8737  __pyx_vtable_3zmq_4core_6socket_Socket.send = (PyObject *(*)(struct __pyx_obj_3zmq_4core_6socket_Socket *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_3zmq_4core_6socket_6Socket_send *__pyx_optional_args))__pyx_f_3zmq_4core_6socket_6Socket_send;
8738  __pyx_vtable_3zmq_4core_6socket_Socket.recv = (PyObject *(*)(struct __pyx_obj_3zmq_4core_6socket_Socket *, int __pyx_skip_dispatch, struct __pyx_opt_args_3zmq_4core_6socket_6Socket_recv *__pyx_optional_args))__pyx_f_3zmq_4core_6socket_6Socket_recv;
8739  if (PyType_Ready(&__pyx_type_3zmq_4core_6socket_Socket) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
socket.io.js https://github.com/subtleGradient/Tutti.git | JavaScript | 1,706 lines
18		if ('WebSocket' in window){
19			WebSocket.__swfLocation = path + 'lib/vendor/web-socket-js/WebSocketMain.swf';
20		}
348	WS.check = function(){
349		// we make sure WebSocket is not confounded with a previously loaded flash WebSocket
350		return 'WebSocket' in window && !('__initialize' in WebSocket);
721	
722	Socket.prototype.addListener = Socket.prototype.addEvent = Socket.prototype.addEventListener = Socket.prototype.on;
723	
1640    if (!window.WEB_SOCKET_SWF_LOCATION) {
1641      console.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");
1642      return;
1655    swfobject.embedSWF(
1656      WEB_SOCKET_SWF_LOCATION, "webSocketFlash", "8", "8", "9.0.0",
1657      null, {bridgeName: "webSocket"}, null, null,
socket.io.js https://github.com/JanSchumacher/Socket.IO-Java.git | JavaScript | 2,185 lines
15		this.path = /\/$/.test(path) ? path : path + '/';
16		WEB_SOCKET_SWF_LOCATION = path + 'flashsocket/WebSocketMain.swf';
17	}
24    if (typeof WEB_SOCKET_SWF_LOCATION === 'undefined')
25        WEB_SOCKET_SWF_LOCATION = '/socket.io/flashsocket/WebSocketMain.swf';
26}
555		// we make sure WebSocket is not confounded with a previously loaded flash WebSocket
556		return 'WebSocket' in window && WebSocket.prototype && ( WebSocket.prototype.send && !!WebSocket.prototype.send.toString().match(/native/i)) && typeof WebSocket !== "undefined";
557	};
991
992	Socket.prototype.socketState = Socket.prototype.CLOSED;
993	Socket.prototype._events = {};
1183	
1184	Socket.prototype.addListener = Socket.prototype.addEvent = Socket.prototype.addEventListener = Socket.prototype.on;
1185	
Socket.h https://github.com/tzickel/xbmc-pvr-addons.git | C++ Header | 309 lines
49  #include <sys/types.h>     /* for socket,connect */
50  #include <sys/socket.h>    /* for socket,connect */
51  #include <sys/un.h>        /* for Unix socket */
129     */
130    Socket(const enum SocketFamily family, const enum SocketDomain domain, const enum SocketType type, const enum SocketProtocol protocol = tcp);
131    Socket(void);
288
289    SOCKET _sd;                         ///< Socket Descriptor
290    SOCKADDR_IN _sockaddr;              ///< Socket Address
292    enum SocketFamily _family;          ///< Socket Address Family
293    enum SocketProtocol _protocol;      ///< Socket Protocol
294    enum SocketType _type;              ///< Socket Type
294    enum SocketType _type;              ///< Socket Type
295    enum SocketDomain _domain;          ///< Socket domain
296
065-tcp-socket-timeout.t https://bitbucket.org/redpitaya/redpitaya.git | Unknown | 676 lines
40
41=== TEST 1: lua_socket_connect_timeout only
42--- config
43    server_tokens off;
44    lua_socket_connect_timeout 100ms;
45    resolver $TEST_NGINX_RESOLVER;
48        content_by_lua '
49            local sock = ngx.socket.tcp()
50            local ok, err = sock:connect("agentzh.org", 12345)
63--- error_log
64lua tcp socket connect timeout: 100
65lua tcp socket connect timed out
68
69=== TEST 2: sock:settimeout() overrides lua_socket_connect_timeout
70--- config
058-tcp-socket.t https://bitbucket.org/redpitaya/redpitaya.git | Unknown | 2,129 lines
31        content_by_lua '
32            local sock = ngx.socket.tcp()
33            local port = ngx.var.port
167        content_by_lua '
168            local sock = ngx.socket.tcp()
169            local port = ngx.var.port
195--- error_log
196attempt to send data on a closed socket:
197
207        content_by_lua '
208            local sock = ngx.socket.tcp()
209            local port = 80
1398--- error_log eval
1399["lua reuse socket upstream", "lua tcp socket reconnect without shutting down"]
1400
shd-socket.h https://github.com/amiller/shadow.git | C++ Header | 111 lines
13typedef gboolean (*SocketIsFamilySupportedFunc)(Socket* socket, sa_family_t family);
14typedef gint (*SocketConnectToPeerFunc)(Socket* socket, in_addr_t ip, in_port_t port, sa_family_t family);
15typedef void (*SocketProcessFunc)(Socket* socket, Packet* packet);
70
71void socket_init(Socket* socket, SocketFunctionTable* vtable, DescriptorType type, gint handle,
72		guint receiveBufferSize, guint sendBufferSize);
90gboolean socket_addToOutputBuffer(Socket* socket, Packet* packet);
91Packet* socket_removeFromOutputBuffer(Socket* socket);
92
97gboolean socket_getSocketName(Socket* socket, in_addr_t* ip, in_port_t* port);
98void socket_setSocketName(Socket* socket, in_addr_t ip, in_port_t port, gboolean isInternal);
99
105gboolean socket_isUnix(Socket* socket);
106void socket_setUnix(Socket* socket, gboolean isUnixSocket);
107void socket_setUnixPath(Socket* socket, const gchar* path, gboolean isBound);
socket.js https://github.com/lenines/rubyrest.git | JavaScript | 493 lines
29function Socket(opts){
30  if (!(this instanceof Socket)) return new Socket(opts);
31
53  this.flashPath = opts.flashPath || '';
54  this.transports = opts.transports || ['polling', 'websocket', 'flashsocket'];
55  this.readyState = '';
60  Socket.sockets.push(this);
61  Socket.sockets.evs.emit('add', this);
62};
81
82Socket.sockets = [];
83Socket.sockets.evs = new Emitter;
89
90Socket.Socket = Socket;
91Socket.Transport = require('./transport');
Socket.cpp https://github.com/crmne/marsyas.git | C++ | 235 lines
5    This class provides a uniform cross-platform
6    TCP socket client or socket server interface.
7    Methods are provided for reading or writing
79
80Socket :: Socket(int port, const char *hostname )
81{
206
207  ::closesocket( socket );
208
217
218int Socket :: writeBuffer(int socket, const void *buffer, long bufferSize, int flags )
219{
229
230int Socket :: readBuffer(int socket, void *buffer, long bufferSize, int flags )
231{
socket.io.js https://github.com/avionwd/phpsocket.io.git | JavaScript | 3,154 lines
1292    // that we don't reset the timeout on an explicitly disconnected connection.
1293    if (this.socket.connected || this.socket.connecting || this.socket.reconnecting) {
1294      this.setCloseTimeout();
1478   *
1479   * @param {Socket} socket The socket instance that needs a transport
1480   * @param {Function} fn The callback
2690          usesXDomReq = (global.XDomainRequest && request instanceof XDomainRequest),
2691          socketProtocol = (socket && socket.options && socket.options.secure ? 'https:' : 'http:'),
2692          isXProtocol = (global.location && socketProtocol != global.location.protocol);
2867   *
2868   * @param {Socket} socket The socket instance that needs a transport
2869   * @param {Function} fn The callback
3100   *
3101   * @param {Socket} socket The socket instance that needs a transport
3102   * @param {Function} fn The callback
socket.js https://github.com/raghunat/suny-live.git | JavaScript | 628 lines
36function Socket(uri, opts){
37  if (!(this instanceof Socket)) return new Socket(uri, opts);
38
108
109Socket.Socket = Socket;
110Socket.Transport = require('./transport');
169  var transport;
170  if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') != -1) {
171    transport = 'websocket';
244        self.emit('upgrading', transport);
245        Socket.priorWebsocketSuccess = 'websocket' == transport.name;
246
342  this.readyState = 'open';
343  Socket.priorWebsocketSuccess = 'websocket' == this.transport.name;
344  this.emit('open');
socket.rs https://github.com/decentfox/zmq.rs.git | Rust | 205 lines
13/// *message queue*, with the exact queueing semantics depending on the socket type in use. Where
14/// conventional sockets transfer streams of bytes or discrete datagrams, ØMQ sockets transfer
15/// discrete *messages*.
80    /// // Create a zmq::PUB socket
81    /// let socket = ctx.socket(zmq::PUB);
82    /// // Bind it to a in-process transport with the address 'my_publisher'
108    /// > was or could actually be established. Because of this, for most transports and socket
109    /// > types the order in which a *server* socket is bound and a *client* socket is connected to
110    /// > it does not matter. The first exception is when using the `inproc://` transport: you must
136    /// // Create a ZMQ_SUB socket
137    /// let socket = ctx.socket(zmq::SUB);
138    /// // Connect it to an in-process transport with the address 'my_publisher'
165    /// >> The *`msg_recv()`* operation cannot be performed on this socket at the moment due to the
166    /// >> socket not being in the appropriate state. This error may occur with socket types that
167    /// >> switch between several states, such as `zmq::REP`.
Socket.h https://github.com/my4ndr0id/android_external_alljoyn_common.git | C++ Header | 463 lines
81 */
82QStatus Socket(AddressFamily addrFamily, SocketType type, SocketFd& sockfd);
83
147 */
148QStatus Accept(SocketFd sockfd, IPAddress& remoteAddr, uint16_t& remotePort, SocketFd& newSockfd);
149
184 */
185QStatus SocketDup(SocketFd sockfd, SocketFd& dupSock);
186
191 */
192QStatus SocketPair(SocketFd(&sockets)[2]);
193
448 */
449QStatus SetMulticastHops(SocketFd socketFd, AddressFamily family, uint32_t hops);
450
os-socket.h https://github.com/spike008t/libcec.git | C++ Header | 302 lines
67  //@{
68  inline void SerialSocketClose(serial_socket_t socket)
69  {
73
74  inline ssize_t SerialSocketWrite(serial_socket_t socket, int *iError, void* data, size_t len)
75  {
119  //@{
120  inline void TcpSocketSetBlocking(tcp_socket_t socket, bool bSetTo)
121  {
137
138  inline ssize_t TcpSocketWrite(tcp_socket_t socket, int *iError, void* data, size_t len)
139  {
153
154  inline ssize_t TcpSocketRead(tcp_socket_t socket, int *iError, void* data, size_t len, uint64_t iTimeoutMs /*= 0*/)
155  {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21