626,242 results for 'socket repo:kennyb500/thesis' (34 ms)
http.js https://github.com/flochtililoch/automate.git | JavaScript | 2,116 lines
39function readStart(socket) { 40 if (!socket || !socket._handle || !socket._handle.readStart) return; 41 socket._handle.readStart(); 44function readStop(socket) { 45 if (!socket || !socket._handle || !socket._handle.readStop) return; 46 socket._handle.readStop(); 1092 socket.on('close', onServerResponseClose); 1093 this.socket = socket; 1094 this.connection = socket; 1211 self.sockets = {}; 1212 self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets; 1213 self.on('free', function(socket, host, port, localAddress) { 2031 2032 res.detachSocket(socket); 2033index.js https://github.com/carlolee/sails.git | JavaScript | 1,459 lines
121 // If a string was sent, try to look up a socket with that ID 122 if (typeof socket == 'string') {socket = sails.io.sockets.socket(socket);} 123 148 // If a string was sent, try to look up a socket with that ID 149 if (typeof socket == 'string') {socket = sails.io.sockets.socket(socket);} 150 244 // If a request was passed in, get its socket 245 socket = socket.socket || socket; 246 if (socket) { 294 */ 295 sails.sockets.socketRooms = function(socket) { 296 return _.map(_.keys(sails.io.sockets.manager.roomClients[socket.id]), function(roomName) {return roomName.replace(/^\//,'');}); 674 * 675 * @param {Request|Socket} req - request containing the socket to unsubscribe, or the socket itself 676 * @param {Object|Array|String|Finite} models - id, array of ids, model, or array of modelsHttpSocketTest.php https://github.com/westonkjones/westonkjones.git | PHP | 1,795 lines
205 parent::tearDown(); 206 unset($this->Socket, $this->RequestSocket); 207 } 1426 1427 $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/search', 'query' => array('q' => 'HttpSocket'))); 1428 $this->assertEquals('http://www.cakephp.org/search?q=HttpSocket', $r); 1670/** 1671 * This tests asserts HttpSocket::reset() resets a HttpSocket instance to it's initial state (before Object::__construct 1672 * got executed) 1693/** 1694 * This tests asserts HttpSocket::reset(false) resets certain HttpSocket properties to their initial state (before 1695 * Object::__construct got executed). 1745 $this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.'); 1746 $socket = new HttpSocket(); 1747 try {HttpSocketTest.php https://github.com/Carbenium/cakephp.git | PHP | 1,797 lines
205 parent::tearDown(); 206 unset($this->Socket, $this->RequestSocket); 207 } 1426 1427 $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/search', 'query' => array('q' => 'HttpSocket'))); 1428 $this->assertEquals('http://www.cakephp.org/search?q=HttpSocket', $r); 1670/** 1671 * This tests asserts HttpSocket::reset() resets a HttpSocket instance to it's initial state (before Object::__construct 1672 * got executed) 1693/** 1694 * This tests asserts HttpSocket::reset(false) resets certain HttpSocket properties to their initial state (before 1695 * Object::__construct got executed). 1745 $this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.'); 1746 $socket = new HttpSocket(); 1747 try {of_driver_tests.erl https://github.com/chinnurtb/of_driver.git | Erlang | 625 lines
81 ok = application:start(of_driver), 82 Socket = connect(), 83 {Socket, ConnTable}. 84 85cleanup({Socket, _ConnTable}) -> 86 ok = gen_tcp:close(Socket), 129 meck:expect(of_driver_handler_mock, terminate, fun(_Reason, callback_state) -> ok end), 130 Socket = connect(ExpectedDatapathId), 131 gen_tcp:close(Socket), 157 meck:expect(of_driver_handler_mock, handle_disconnect, fun(_Reason, aux_callback_state) -> ok end), 158 Socket = connect(ExpectedDatapathId), 159 _AuxSocket = connect(ExpectedDatapathId, ExpectedAuxId), 159 _AuxSocket = connect(ExpectedDatapathId, ExpectedAuxId), 160 gen_tcp:close(Socket), 161 ?assert(meck:validate(of_driver_handler_mock)).rai.js https://github.com/bharat-daffodilsw/pajhwoklive.git | JavaScript | 751 lines
314 socket.on("command", (function(command){ 315 process.nextTick(socket.startTLS.bind(socket, function(){ 316 test.ok(false, "Secure connection opened"); // should not occur 603 case "NOOP": socket.send("250 OK"); break; 604 case "QUIT": socket.send("221 Bye"); socket.end(); break; 605 default: socket.send("500"); 634 case "NOOP": socket.send("250 OK"); break; 635 case "QUIT": socket.send("221 Bye"); socket.end(); break; 636 default: socket.send("500"); 675 case "QUIT": socket.send("221 Bye"); socket.end(); break; 676 case "STARTTLS": socket.startTLS(); socket.send("220 Go ahead"); break; 677 default: socket.send("500"); 723 case "QUIT": socket.send("221 Bye"); socket.end(); break; 724 case "STARTTLS": socket.startTLS(); socket.send("220 Go ahead"); break; 725 default: socket.send("500");TcpReceiver.java https://github.com/get-vitamin-c/mirth-connect.git | Java | 924 lines
156 socket = serverSocket.accept(); 157 logger.trace("Accepted new socket: " + socket.getRemoteSocketAddress().toString() + " -> " + socket.getLocalSocketAddress()); 158 } catch (java.io.InterruptedIOException e) { 638 639 eventController.dispatchEvent(new ConnectorCountEvent(getChannelId(), getMetaDataId(), getSourceName(), ConnectionStatusEventType.IDLE, SocketUtil.getLocalAddress(socket) + " -> " + SocketUtil.getInetAddress(socket), (Boolean) null)); 640 } else { 703 704 eventController.dispatchEvent(new ConnectorCountEvent(getChannelId(), getMetaDataId(), getSourceName(), ConnectionStatusEventType.DISCONNECTED, SocketUtil.getLocalAddress(socket) + " -> " + SocketUtil.getInetAddress(socket), false)); 705 776 logger.error("Error sending response (" + connectorProperties.getName() + " \"Source\" on channel " + getChannelId() + ").", e); 777 eventController.dispatchEvent(new ConnectionStatusEvent(getChannelId(), getMetaDataId(), getSourceName(), ConnectionStatusEventType.FAILURE, "Error sending response to " + (newConnection ? SocketUtil.getInetAddress(responseSocket) : SocketUtil.getLocalAddress(responseSocket)) + ": " + e.getMessage() + " ")); 778 throw e; 896 */ 897 private void initSocket(Socket socket) throws SocketException { 898 logger.debug("Initializing socket (" + connectorProperties.getName() + " \"Source\" on channel " + getChannelId() + ").");zmq_getsockopt.txt https://github.com/mccheung/avbot.git | text | 686 lines
169The 'ZMQ_HANDSHAKE_IVL' option shall retrieve the maximum handshake interval 170for the specified 'socket'. Handshaking is the exchange of socket configuration 171information (socket type, identity, security) that occurs when a connection 228Retrieve the IPv6 option for the socket. A value of `1` means IPv6 is 229enabled on the socket, while `0` means the socket will use only IPv4. 230When IPv6 is enabled the socket will connect to, or accept connections 396blocking or dropping sent messages. Refer to the individual socket descriptions 397in linkzmq:zmq_socket[3] for details on the exact action taken for each socket 398type. 512blocking or dropping sent messages. Refer to the individual socket descriptions 513in linkzmq:zmq_socket[3] for details on the exact action taken for each socket 514type. 600The 'ZMQ_TYPE' option shall retrieve the socket type for the specified 601'socket'. The socket type is specified at socket creation time and 602cannot be modified afterwards.zmq_setsockopt.txt https://github.com/mccheung/avbot.git | text | 882 lines
26'option_name' argument to the value pointed to by the 'option_value' argument 27for the 0MQ socket pointed to by the 'socket' argument. The 'option_len' 28argument is the size of the option value in bytes. 175The 'ZMQ_HANDSHAKE_IVL' option shall set the maximum handshake interval for 176the specified 'socket'. Handshaking is the exchange of socket configuration 177information (socket type, identity, security) that occurs when a connection 650blocking or dropping sent messages. Refer to the individual socket descriptions 651in linkzmq:zmq_socket[3] for details on the exact action taken for each socket 652type. 682The 'ZMQ_SUBSCRIBE' option shall establish a new message filter on a 'ZMQ_SUB' 683socket. Newly created 'ZMQ_SUB' sockets shall filter out all incoming messages, 684therefore you should call this option to establish an initial message filter. 711Default value:: no filters (allow from all) 712Applicable socket types:: all listening sockets, when using TCP transports. 713winnet.c https://github.com/dcorbe/putty.git | C | 1,836 lines
31 * abstract, Socket no longer means a tcp socket (it could mean 32 * an ssl socket). So now we must use Actual_Socket when we know 33 * we are talking about a tcp socket. 34 */ 35typedef struct Socket_tag *Actual_Socket; 36 124{ 125 Actual_Socket a = (Actual_Socket) av, b = (Actual_Socket) bv; 126 unsigned long as = (unsigned long) a->s, bs = (unsigned long) b->s; 418 case WSAENOTSOCK: 419 return "Network error: Socket operation on non-socket"; 420 case WSAEOPNOTSUPP: 1790 1791extern int socket_writable(SOCKET skt) 1792{goagent.py https://github.com/yourmoonlight/gaeproxy.git | Python | 2,418 lines
409 410 has_gevent = socket.socket is getattr(sys.modules.get('gevent.socket'), 'socket', None) 411 548 if dns_v4_servers: 549 sock_v4 = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 550 socks.append(sock_v4) 551 if dns_v6_servers: 552 sock_v6 = socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) 553 socks.append(sock_v6) 711 # create a ipv4/ipv6 socket object 712 sock = socket.socket(socket.AF_INET if ':' not in ipaddr[0] else socket.AF_INET6) 713 # set reuseaddr option to avoid 10048 socket error 783 # create a ipv4/ipv6 socket object 784 sock = socket.socket(socket.AF_INET if ':' not in ipaddr[0] else socket.AF_INET6) 785 # set reuseaddr option to avoid 10048 socket errortransformer.base.js https://github.com/OpenGrape/primus.git | JavaScript | 1,356 lines
43 destroy = services.destroy; 44 Socket = services.Socket; 45 server = services.server; 262 it('sends & receives messages', function (done) { 263 var socket = new Socket(server.addr); 264 1286 1287 var socket = new Socket(server.addr); 1288 }); 1313 1314 var socket = new Socket(server.addr); 1315 socket.write('foo'); 1333 1334 var socket = new Socket(server.addr); 1335 socket.write('foo');socat.1 https://github.com/xscc/socat.git | Unknown | 3,702 lines
772.IP "\fB\f(CWSOCKET\-CONNECT:<domain>:<protocol>:<remote\-address>\fP\fP" 773Creates a stream socket using the first and second given socket parameters 774and \f(CWSOCK_STREAM\fP (see man socket\e(2)) and connects to the remote\-address\&. 854.IP "\fB\f(CWSOCKET\-RECV:<domain>:<type>:<protocol>:<local\-address>\fP\fP" 855Creates a socket using the three given socket parameters (see man socket\e(2)) 856and binds it to <local\-address>\&. Receives arriving data\&. The three 877.IP "\fB\f(CWSOCKET\-RECVFROM:<domain>:<type>:<protocol>:<local\-address>\fP\fP" 878Creates a socket using the three given socket parameters (see man socket\e(2)) 879and binds it to <local\-address>\&. Receives arriving data and sends replies 2105connected to <bytes> [int]\&. 2106With TCP sockets, this value corresponds to the socket\(cq\&s 2107maximal window size\&. 2145[int]\&. Address resolution is not affected by this option\&. 2146Under Linux, 1 means stream oriented socket, 2 means datagram socket, and 3 2147means raw socket\&.socat.yo https://github.com/xscc/socat.git | Unknown | 3,525 lines
762label(ADDRESS_SOCKET_RECV)dit(bf(tt(SOCKET-RECV:<domain>:<type>:<protocol>:<local-address>))) 763 Creates a socket using the three given socket parameters (see man socket\(2)) 764 and binds it to <local-address>. Receives arriving data. The three 783label(ADDRESS_SOCKET_RECVFROM)dit(bf(tt(SOCKET-RECVFROM:<domain>:<type>:<protocol>:<local-address>))) 784 Creates a socket using the three given socket parameters (see man socket\(2)) 785 and binds it to <local-address>. Receives arriving data and sends replies 1086 It works well with socat UDP-RECVFROM and UDP-RECV address peers.nl() 1087 Option groups: link(FD)(GROUP_FD),link(SOCKET)(GROUP_SOCKET),link(IP4)(GROUP_IP4),link(IP6)(GROUP_IP6) nl() 1088 Useful options: 1868 [link(int)(TYPE_INT)]. Address resolution is not affected by this option. 1869 Under Linux, 1 means stream oriented socket, 2 means datagram socket, and 3 1870 means raw socket. 1872 Sets the protocol of the socket, specified as third argument to the 1873 code(socket()) or code(socketpair()) calls, to <prototype> 1874 [link(int)(TYPE_INT)]. Address resolution is not affected by this option.http.js https://github.com/ImyarekRu/Paradox.git | JavaScript | 1,414 lines
115 * @param client the http client. 116 * @param socket the socket to use. 117 */ 177 * @param client the parent http client. 178 * @param socket the socket to set up. 179 * @param tlsOptions if the socket must use TLS, the TLS options. 447 * storage, false to only keep cookies in javascript. 448 * primeTlsSockets: true to immediately connect TLS sockets on 449 * their creation so that they will cache TLS sessions for reuse. 561 for(var i = 0; i < options.connections; ++i) { 562 _initSocket(client, sp.createSocket(), tlsOptions); 563 } 635 } 636 // no connected socket available, get unconnected socket 637 if(socket === null) {socket.io.js https://github.com/kirillKey/questSearchTrain.git | JavaScript | 6,253 lines
1515 1516Socket.Socket = Socket; 1517Socket.Transport = _dereq_('./transport'); 1578 var transport; 1579 if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') != -1) { 1580 transport = 'websocket'; 1671 if (!transport) return; 1672 Socket.priorWebsocketSuccess = 'websocket' == transport.name; 1673 1767 this.readyState = 'open'; 1768 Socket.priorWebsocketSuccess = 'websocket' == this.transport.name; 1769 this.emit('open'); 4551 4552var WebSocket = global.WebSocket || global.MozWebSocket; 4553connection.js https://github.com/kirillKey/questSearchTrain.git | JavaScript | 348 lines
129 var manager = io.Manager({ reconnection: true, timeout: 0, reconnectionAttempts: 2, reconnectionDelay: 10 }); 130 var socket = manager.socket('/timeout_socket'); 131 147 var manager = io.Manager({ reconnection: true }); 148 var socket = manager.socket('/timeout_socket'); 149 162 var manager = io.Manager({ reconnection: true, timeout: 0, reconnectionAttempts: 2, reconnectionDelay: 10 }); 163 var socket = manager.socket('/timeout_socket'); 164 201 var manager = io.Manager('http://localhost:3940', { reconnection: true, reconnectionAttempts: 2, reconnectionDelay: 10 }); 202 var socket = manager.socket('/asd'); 203 var reconnects = 0; 232 233 var socket = manager.socket('/invalid'); 234 });_http_client.js https://github.com/osfreak/node.git | JavaScript | 571 lines
86 87 self.socketPath = options.socketPath; 88 306 307 assert(parser && parser.socket === socket); 308 516 if (method) { 517 self.socket[method].apply(self.socket, arguments_); 518 } 523 if (!self.socket) { 524 self.once('socket', onSocket); 525 } else { 537 538 if (this.socket && this.socket.writable) { 539 if (this.timeoutCb)net.markdown https://github.com/osfreak/node.git | Unknown | 566 lines
19If `allowHalfOpen` is `true`, then the socket won't automatically send a FIN 20packet when the other end of the socket sends a FIN packet. The socket becomes 21non-readable, but still writable. You should call the `end()` method explicitly. 55 56Constructs a new socket object and opens the socket to the given location. 57When the socket is established, the ['connect'][] event will be emitted. 296 297This object is an abstraction of a TCP or local socket. `net.Socket` 298instances implement a duplex Stream interface. They can be created by the 398Sets the socket to timeout after `timeout` milliseconds of inactivity on 399the socket. By default `net.Socket` do not have a timeout. 400 437Calling `unref` on a socket will allow the program to exit if this is the only 438active socket in the event system. If the socket is already `unref`d calling 439`unref` again will have no effect.socket.c https://github.com/ahwuyeah/ruby.git | C | 2,178 lines
253 * Socket.pair(domain, type, protocol) => [socket1, socket2] 254 * Socket.socketpair(domain, type, protocol) => [socket1, socket2] 255 * 2043 * machine or between different machines. There are many types of socket: 2044 * TCPSocket, UDPSocket or UNIXSocket for example. 2045 * 2072 * 2073 * Many of the classes, such as TCPSocket, UDPSocket or UNIXSocket, 2074 * ease the use of sockets comparatively to the equivalent C programming interface. 2141 */ 2142 rb_cSocket = rb_define_class("Socket", rb_cBasicSocket); 2143 2157 2158 rb_define_singleton_method(rb_cSocket, "socketpair", rsock_sock_s_socketpair, -1); 2159 rb_define_singleton_method(rb_cSocket, "pair", rsock_sock_s_socketpair, -1);