626,242 results for 'socket repo:jsjohnst/Socket.IO' (21 ms)
cs.c https://bitbucket.org/altlc/wive-rtnl-ralink-rt305x-routers-firmware-amod.git | C | 961 lines
111 down_read(&pcmcia_socket_list_rwsem); 112 list_for_each_entry(socket, &pcmcia_socket_list, socket_list) { 113 if (socket->dev.parent != dev) 183 184 if (!socket || !socket->ops || !socket->dev.parent || !socket->resource_ops) 185 return -EINVAL; 216 } 217 list_add_tail(&socket->socket_list, &pcmcia_socket_list); 218 up_write(&pcmcia_socket_list_rwsem); 252 if (!socket->thread) { 253 printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket); 254 return -EIO; 732 733 if ((s->state & (SOCKET_PRESENT|SOCKET_CARDBUS)) == SOCKET_PRESENT) 734 send_event(s, CS_EVENT_CARD_INSERTION, CS_EVENT_PRI_LOW);transports.websocket.test.js https://bitbucket.org/odle3536/480-secure-chat.git | JavaScript | 1,892 lines
21module.exports = { 22 'websocket identifies as websocket': function (done) { 23 var cl = client(++ports) 28 io.on('connection', function (socket) { 29 socket.manager.transports[socket.id].name.should.equal('websocket'); 30 ws.finishClose(); 165 var sid = data.split(':')[0]; 166 var url = '/socket.io/' + sio.protocol + '/websocket/' + sid; 167 var req = cl.get(url, {headers: headers}, function (res, data) {}); 1829 1830 io.sockets.on('connection', function (socket) { 1831 var self = this 1865 io.sockets.on('connection', function (socket) { 1866 socket.transport.should.equal('websocket'); 1867socket.c https://bitbucket.org/zarboz/droid-dna-beastmode.git | C | 3,400 lines
1/* 2 * NET An implementation of the SOCKET network access protocol. 3 * 29 * allowed to allocate. 30 * Linus : Argh. removed all the socket allocation 31 * altogether: it's in the inode now. 278{ 279 struct socket_alloc *ei = (struct socket_alloc *)foo; 280 1252 if (net_ratelimit()) 1253 printk(KERN_WARNING "socket: no more sockets\n"); 1254 return -ENFILE; /* Not exactly a match, but its the 3281 3282int kernel_accept(struct socket *sock, struct socket **newsock, int flags) 3283{socket.c https://bitbucket.org/zarboz/ville-dlx-merger.git | C | 3,400 lines
1/* 2 * NET An implementation of the SOCKET network access protocol. 3 * 29 * allowed to allocate. 30 * Linus : Argh. removed all the socket allocation 31 * altogether: it's in the inode now. 278{ 279 struct socket_alloc *ei = (struct socket_alloc *)foo; 280 1252 if (net_ratelimit()) 1253 printk(KERN_WARNING "socket: no more sockets\n"); 1254 return -ENFILE; /* Not exactly a match, but its the 3281 3282int kernel_accept(struct socket *sock, struct socket **newsock, int flags) 3283{sock.h https://bitbucket.org/secollab/pjsip-mikey-sakke.git | C Header | 1,411 lines
38 * The PJLIB socket abstraction layer is a thin and very portable abstraction 39 * for socket API. It provides API similar to BSD socket API. The abstraction 40 * is needed because BSD socket API is not always available on all platforms, 174 */ 175/** Socket level. @see pj_SOL_SOCKET() */ 176extern const pj_uint16_t PJ_SOL_SOCKET; 1142 * addrlen bytes long. Traditionally, this is called assigning a name to 1143 * a socket. When a socket is created with #pj_sock_socket(), it exists in a 1144 * name space (address family) but has no name assigned. 1220/** 1221 * The file descriptor sockfd must refer to a socket. If the socket is of 1222 * type PJ_SOCK_DGRAM then the serv_addr address is the address to which 1270/** 1271 * Get socket option associated with a socket. Options may exist at multiple 1272 * protocol levels; they are always present at the uppermost socket level.HttpSocketTest.php https://bitbucket.org/npavlicevic/cakeblog_new.git | PHP | 1,723 lines
310/** 311 * Tests that HttpSocket::request (the heart of the HttpSocket) is working properly. 312 * 1394 1395 $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/search', 'query' => array('q' => 'HttpSocket'))); 1396 $this->assertEquals('http://www.cakephp.org/search?q=HttpSocket', $r); 1637/** 1638 * This tests asserts HttpSocket::reset() resets a HttpSocket instance to it's initial state (before Object::__construct 1639 * got executed) 1660/** 1661 * This tests asserts HttpSocket::reset(false) resets certain HttpSocket properties to their initial state (before 1662 * Object::__construct got executed). 1710 $this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.'); 1711 $socket = new HttpSocket(); 1712 try {socket.h https://bitbucket.org/markjenkins/libreoffice_ubuntu-debian-fixes.git | C Header | 909 lines
429*/ 430SAL_DLLPUBLIC oslSocketAddr SAL_CALL osl_getLocalAddrOfSocket(oslSocket Socket); 431 437*/ 438SAL_DLLPUBLIC oslSocketAddr SAL_CALL osl_getPeerAddrOfSocket(oslSocket Socket); 439 837*/ 838SAL_DLLPUBLIC void SAL_CALL osl_addToSocketSet(oslSocketSet Set, oslSocket Socket); 839 843*/ 844SAL_DLLPUBLIC void SAL_CALL osl_removeFromSocketSet(oslSocketSet Set, oslSocket Socket); 845 850*/ 851SAL_DLLPUBLIC sal_Bool SAL_CALL osl_isInSocketSet(oslSocketSet Set, oslSocket Socket); 852GCDAsyncSocket.h https://bitbucket.org/khips/cohlua.git | C Header | 1,074 lines
801 * Here's how you would accomplish something like that: 802 * - (dispatch_queue_t)newSocketQueueForConnectionFromAddress:(NSData *)address onSocket:(GCDAsyncSocket *)sock 803 * { 811 * } 812 * - (void)socket:(GCDAsyncSocket *)sock didAcceptNewSocket:(GCDAsyncSocket *)newSocket 813 * { 958 * This method is called immediately prior to socket:didAcceptNewSocket:. 959 * It optionally allows a listening socket to specify the socketQueue for a new accepted socket. 960 * If this method is not implemented, or returns NULL, the new accepted socket will create its own default queue. 974**/ 975- (dispatch_queue_t)newSocketQueueForConnectionFromAddress:(NSData *)address onSocket:(GCDAsyncSocket *)sock; 976 986**/ 987- (void)socket:(GCDAsyncSocket *)sock didAcceptNewSocket:(GCDAsyncSocket *)newSocket; 988socket.c https://bitbucket.org/codefirex/kernel_lge_geehrc.git | C | 3,389 lines
1/* 2 * NET An implementation of the SOCKET network access protocol. 3 * 29 * allowed to allocate. 30 * Linus : Argh. removed all the socket allocation 31 * altogether: it's in the inode now. 278{ 279 struct socket_alloc *ei = (struct socket_alloc *)foo; 280 1217 if (net_ratelimit()) 1218 printk(KERN_WARNING "socket: no more sockets\n"); 1219 return -ENFILE; /* Not exactly a match, but its the 3271 3272int kernel_accept(struct socket *sock, struct socket **newsock, int flags) 3273{Network.java https://bitbucket.org/cleto/zeroc-ice-package.git | Java | 1,296 lines
85 java.nio.channels.SocketChannel fd = java.nio.channels.SocketChannel.open(); 86 java.net.Socket socket = fd.socket(); 87 socket.setTcpNoDelay(true); 294 { 295 java.net.Socket socket = fd.socket(); 296 socket.setTcpNoDelay(true); 618 { 619 java.net.DatagramSocket socket = fd.socket(); 620 socket.setSendBufferSize(size); 1057 { 1058 java.net.Socket socket = ((java.nio.channels.SocketChannel)fd).socket(); 1059 localAddr = socket.getLocalAddress(); 1092 { 1093 java.net.Socket socket = ((java.nio.channels.SocketChannel)fd).socket(); 1094 localAddr = socket.getLocalAddress();Network.cs https://bitbucket.org/cleto/zeroc-ice-package.git | C# | 1,443 lines
446#if !SILVERLIGHT 447 socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, 1); 448#endif 563#else 564 socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer, sz); 565#endif 581#else 582 sz = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer); 583#endif 599#else 600 socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer, sz); 601#endif 633 { 634 socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, reuse ? 1 : 0); 635 }llc.py https://bitbucket.org/jialvarez/nfcpy.git | Python | 597 lines
109 for socket in self.sock_list: 110 if pdu.ssap == socket.peer or socket.peer is None: 111 socket.enqueue(pdu) 565 raise Error(errno.ENOTSOCK) 566 if not (socket.addr and self.sap[socket.addr]): 567 raise Error(errno.EBADF) 572 if isinstance(socket, DataLinkConnection): 573 return (socket.recv(), socket.peer) 574 577 raise Error(errno.ENOTSOCK) 578 if not (socket.addr and self.sap[socket.addr]): 579 raise Error(errno.EBADF) 585 if socket.is_bound: 586 self.sap[socket.addr].remove_socket(socket) 587 else: socket.close()llcp-test-client.py https://bitbucket.org/jialvarez/nfcpy.git | Python | 893 lines
259 info("Test 3: connection-oriented information transfer", prefix="") 260 socket = nfc.llcp.socket(nfc.llcp.DATA_LINK_CONNECTION) 261 nfc.llcp.setsockopt(socket, nfc.llcp.SO_RCVBUF, 2) 651 dlc_socket = nfc.llcp.socket(nfc.llcp.DATA_LINK_CONNECTION) 652 raw_socket = nfc.llcp.socket(nfc.llcp.llc.RAW_ACCESS_POINT) 653 try: 679 info("connection-mode echo server on sap {0}".format(co_echo_server)) 680 dlc_socket = nfc.llcp.socket(nfc.llcp.DATA_LINK_CONNECTION) 681 raw_socket = nfc.llcp.socket(nfc.llcp.llc.RAW_ACCESS_POINT) 698 info("Test 12: maximum data size on data link connection", prefix="") 699 socket = nfc.llcp.socket(nfc.llcp.DATA_LINK_CONNECTION) 700 nfc.llcp.setsockopt(socket, nfc.llcp.SO_RCVBUF, 2) 732 socket1 = nfc.llcp.socket(nfc.llcp.DATA_LINK_CONNECTION) 733 socket2 = nfc.llcp.socket(nfc.llcp.DATA_LINK_CONNECTION) 734 co_echo_server = options.co_echo_sapsocket.c https://bitbucket.org/bradfa/linux.git | C | 3,456 lines
1/* 2 * NET An implementation of the SOCKET network access protocol. 3 * 29 * allowed to allocate. 30 * Linus : Argh. removed all the socket allocation 31 * altogether: it's in the inode now. 278{ 279 struct socket_alloc *ei = (struct socket_alloc *)foo; 280 1297 if (!sock) { 1298 net_warn_ratelimited("socket: no more sockets\n"); 1299 return -ENFILE; /* Not exactly a match, but its the 3340 3341int kernel_accept(struct socket *sock, struct socket **newsock, int flags) 3342{blcksock.pas https://bitbucket.org/valicek1/little-debug-helper.git | Pascal | 4,352 lines
675 {:This function is for check for incoming data on set of sockets. Whitch 676 sockets is checked is decribed by SocketList Tlist with TBlockSocket 677 objects. TList may have maximal number of objects defined by FD_SETSIZE 725 on TCP socket)} 726 property Socket: TSocket read FSocket write SetSocket; 727 849 Ipv4, IPv6 or automatic mode)} 850 property OnCreateSocket: THookCreateSocket read FOnCreateSocket write FOnCreateSocket; 851 1856 FIP6Used := Sin.AddressFamily = AF_INET6; 1857 FSocket := synsock.Socket(integer(Sin.AddressFamily), GetSocketType, GetSocketProtocol); 1858 if FSocket = INVALID_SOCKET then 3040 3041procedure TBlockSocket.SetSocket(Value: TSocket); 3042beginHttpSocketTest.php https://bitbucket.org/gencer/cakephp.git | PHP | 1,815 lines
205 parent::tearDown(); 206 unset($this->Socket, $this->RequestSocket); 207 } 1445 1446 $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/search', 'query' => array('q' => 'HttpSocket'))); 1447 $this->assertEquals('http://www.cakephp.org/search?q=HttpSocket', $r); 1689/** 1690 * This tests asserts HttpSocket::reset() resets a HttpSocket instance to it's initial state (before Object::__construct 1691 * got executed) 1712/** 1713 * This tests asserts HttpSocket::reset(false) resets certain HttpSocket properties to their initial state (before 1714 * Object::__construct got executed). 1764 $this->skipIf(!extension_loaded('openssl'), 'OpenSSL is not enabled cannot test SSL.'); 1765 $socket = new HttpSocket(); 1766 try {NetUtils.html https://bitbucket.org/vtangirala/venu.git | HTML | 744 lines
143<CODE>static void</CODE></FONT></TD> 144<TD><CODE><B><A HREF="../../../../org/apache/hadoop/net/NetUtils.html#connect(java.net.Socket, java.net.SocketAddress, int)">connect</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</A> socket, 145 <A HREF="http://java.sun.com/javase/6/docs/api/java/net/SocketAddress.html?is-external=true" title="class or interface in java.net">SocketAddress</A> endpoint, 149 This is a drop-in replacement for 150 <A HREF="http://java.sun.com/javase/6/docs/api/java/net/Socket.html?is-external=true#connect(java.net.SocketAddress, int)" title="class or interface in java.net"><CODE>Socket.connect(SocketAddress, int)</CODE></A>.</TD> 151</TR> 214<CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</A></CODE></FONT></TD> 215<TD><CODE><B><A HREF="../../../../org/apache/hadoop/net/NetUtils.html#getInputStream(java.net.Socket, long)">getInputStream</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</A> socket, 216 long timeout)</CODE> 223<CODE>static <A HREF="http://java.sun.com/javase/6/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</A></CODE></FONT></TD> 224<TD><CODE><B><A HREF="../../../../org/apache/hadoop/net/NetUtils.html#getOutputStream(java.net.Socket)">getOutputStream</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/net/Socket.html?is-external=true" title="class or interface in java.net">Socket</A> socket)</CODE> 225 633<DD>This is a drop-in replacement for 634 <A HREF="http://java.sun.com/javase/6/docs/api/java/net/Socket.html?is-external=true#connect(java.net.SocketAddress, int)" title="class or interface in java.net"><CODE>Socket.connect(SocketAddress, int)</CODE></A>. 635 In the case of normal sockets that don't have associated channels, thisSockets.cs https://bitbucket.org/CW2/netduinofirmware.git | C# | 1,555 lines
209 210 private bool GetSocketData(int socketIndex, out SocketData socketData) 211 { 874 875 if (!GetSocket(socket, out sock)) return ReturnError(SocketError.NotSocket); 876 974 975 if (!GetSocket(socket, out sock)) return ReturnError(SocketError.NotSocket); 976 1098 1099 if (!GetSocket(socket, out sock)) return ReturnError(SocketError.NotSocket); 1100 1244 1245 if (!GetSocketData(socket, out sd)) return ReturnError(SocketError.NotSocket); 1246sockets.cpp https://bitbucket.org/CW2/netduinofirmware.git | C++ | 1,485 lines
357 358 if((sock != SOCK_SOCKET_ERROR) && (fCloseDbg || !ISSET_SOCKET_FLAG(g_Sockets_Driver.m_socketHandles[i], SocketRegisterMap::c_DebugSocket))) 359 { 739 // always select multicast socket 740 if(g_Sockets_Driver.m_multicastSocket != SOCK_SOCKET_ERROR) SOCK_FD_SET( g_Sockets_Driver.m_multicastSocket, &g_Sockets_Driver.m_nextReadSet ); 741 1420 if(selectable) SET_SOCKET_FLAG(g_Sockets_Driver.m_socketHandles[g_Sockets_Driver.m_cntSockets], SocketRegisterMap::c_SelectableSocket ); 1421 if(fDebug ) SET_SOCKET_FLAG(g_Sockets_Driver.m_socketHandles[g_Sockets_Driver.m_cntSockets], SocketRegisterMap::c_DebugSocket ); 1422 1465 { 1466 memcpy( &g_Sockets_Driver.m_socketHandles[index], &g_Sockets_Driver.m_socketHandles[g_Sockets_Driver.m_cntSockets], sizeof(g_Sockets_Driver.m_socketHandles[index]) ); 1467 } 1468 1469 g_Sockets_Driver.m_socketHandles[g_Sockets_Driver.m_cntSockets].m_socket = SOCK_SOCKET_ERROR; 1470 g_Sockets_Driver.m_socketHandles[g_Sockets_Driver.m_cntSockets].m_flags = 0;http.js https://bitbucket.org/jmchen/pysource.git | JavaScript | 1,860 lines
268 // TODO Remove one of these eventually. 269 this.socket = socket; 270 this.connection = socket; 1030 self.sockets = {}; 1031 self.maxSockets = self.options.maxSockets || Agent.defaultMaxSockets; 1032 self.on('free', function(socket, host, port, localAddress) { 1067 } 1068 if (this.sockets[name].length < this.maxSockets) { 1069 // If we are under maxSockets create a new one. 1768 } else { 1769 res.assignSocket(socket); 1770 } 1781 1782 res.detachSocket(socket); 1783