626,242 results for 'socket repo:xonotic/darkplaces' (22 ms)
socket.h https://bitbucket.org/tora/avoid-potential-deadlock-during-preparation-of-crash-report | C++ Header | 892 lines
457*/ 458oslSocketResult SAL_CALL osl_connectSocketTo(oslSocket Socket, 459 oslSocketAddr Addr, 479*/ 480oslSocket SAL_CALL osl_acceptConnectionOnSocket(oslSocket Socket, 481 oslSocketAddr* pAddr); 783*/ 784oslSocketType SAL_CALL osl_getSocketType(oslSocket Socket); 785 795*/ 796oslSocketError SAL_CALL osl_getLastSocketError(oslSocket Socket); 797 820*/ 821void SAL_CALL osl_addToSocketSet(oslSocketSet Set, oslSocket Socket); 822test_socket.py https://bitbucket.org/noghriw/jython | Python | 2,253 lines
2067 # And then try to bind again 2068 t = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 2069 t.bind( (HOST, PORT) ) 2080 def setUp(self): 2081 self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 2082 self.s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 2126 def setUp(self): 2127 self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 2128 2131 def setUp(self): 2132 self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 2133 2185 def setUp(self): 2186 self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 2187qtcesterconnection.cpp https://bitbucket.org/boroondas/3p-qt-open-83 | C++ | 553 lines
94 95 QTcpSocket* socket = 0; 96 if (!_initCommand(socket, COMMAND_CREATE_FILE)) { 222 223 _freeSocket(socket); 224 targetFile.close(); 477{ 478 QTcpSocket* sock = new QTcpSocket(); 479 QByteArray ipAddress = qgetenv("DEVICE_IP"); 494 495void QtCesterConnection::_freeSocket(QTcpSocket*& sock) const 496{ 513 QTcpSocket* socket = NULL; 514 if (!_createSocket(socket)) { 515 END_ERROR(socket, "Could not connect to server");basic_socket.hpp https://bitbucket.org/Arroy/13d | C++ Header | 1,521 lines
155 */ 156 basic_socket(basic_socket&& other) 157 : basic_io_object<SocketService>( 193 template <typename Protocol1, typename SocketService1> 194 basic_socket(basic_socket<Protocol1, SocketService1>&& other, 195 typename enable_if<is_convertible<Protocol1, Protocol>::value>::type* = 0) 1467 * @code 1468 * boost::asio::ip::tcp::socket socket(io_service); 1469 * ... 1469 * ... 1470 * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send); 1471 * @endcode 1491 * @code 1492 * boost::asio::ip::tcp::socket socket(io_service); 1493 * ...socket.c https://bitbucket.org/kgp700/siyahkernel | C | 3,132 lines
255 return NULL; 256 ei->socket.wq = kmalloc(sizeof(struct socket_wq), GFP_KERNEL); 257 if (!ei->socket.wq) { 275{ 276 struct socket_wq *wq = container_of(head, struct socket_wq, rcu); 277 291{ 292 struct socket_alloc *ei = (struct socket_alloc *)foo; 293 1192 if (net_ratelimit()) 1193 printk(KERN_WARNING "socket: no more sockets\n"); 1194 return -ENFILE; /* Not exactly a match, but its the 3005 3006int kernel_accept(struct socket *sock, struct socket **newsock, int flags) 3007{AprEndpoint.java http://svn.apache.org/repos/asf/tomcat/ | Java | 1,981 lines
887 if (soLinger >= 0) 888 Socket.optSet(socket, Socket.APR_SO_LINGER, soLinger); 889 if (tcpNoDelay) 1057 */ 1058 protected boolean processSocket(long socket, SocketStatus status) { 1059 try { 1230 if (comet) { 1231 processSocket(socket, SocketStatus.ERROR); 1232 } else { 1828 public SocketState process(long socket); 1829 public SocketState event(long socket, SocketStatus status); 1830 } 1960 1961 public SocketEventProcessor(long socket, SocketStatus status) { 1962 this.socket = socket;NioEndpoint.java http://svn.apache.org/repos/asf/tomcat/ | Java | 1,704 lines
732 */ 733 protected boolean setSocketOptions(SocketChannel socket) { 734 // Process the connection 738 socket.configureBlocking(false); 739 Socket sock = socket.socket(); 740 socketProperties.setProperties(sock); 870 871 protected boolean processSocket(SocketChannel socket) { 872 try { 1546 public SocketState process(NioChannel socket); 1547 public SocketState event(NioChannel socket, SocketStatus status); 1548 } 1678 1679 public SocketEventProcessor(NioChannel socket, SocketStatus status) { 1680 this.socket = socket;basic_socket.hpp https://bitbucket.org/wetterj/fg-gc | C++ Header | 1,063 lines
122 * 123 * @param native_socket A native socket. 124 * 1009 * @code 1010 * boost::asio::ip::tcp::socket socket(io_service); 1011 * ... 1011 * ... 1012 * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send); 1013 * @endcode 1033 * @code 1034 * boost::asio::ip::tcp::socket socket(io_service); 1035 * ... 1036 * boost::system::error_code ec; 1037 * socket.shutdown(boost::asio::ip::tcp::socket::shutdown_send, ec); 1038 * if (ec)test_ssl.py https://bitbucket.org/santa4nt/jython | Python | 1,395 lines
210 with test_support.transient_internet("svn.python.org"): 211 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 212 cert_reqs=ssl.CERT_NONE) 229 # this should succeed because we specify the root cert 230 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 231 cert_reqs=ssl.CERT_REQUIRED, 240 with test_support.transient_internet("svn.python.org"): 241 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 242 cert_reqs=ssl.CERT_REQUIRED, 285 with test_support.transient_internet("svn.python.org"): 286 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 287 cert_reqs=ssl.CERT_REQUIRED, 315 with test_support.transient_internet("svn.python.org"): 316 ss = ssl.wrap_socket(socket.socket(socket.AF_INET)) 317 ss.connect(("svn.python.org", 443))test_socket.py https://bitbucket.org/santa4nt/jython | Python | 1,725 lines
278 # Testing that sendto doens't masks failures. See #10169. 279 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 280 self.addCleanup(s.close) 557 port = self._get_unused_port() 558 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 559 self.addCleanup(sock.close) 575 # We know a socket should start without reuse==0 576 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 577 self.addCleanup(sock.close) 1525 address = "\x00python-test-hello\x00\xff" 1526 s1 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 1527 s1.bind(address) 1677 time.sleep(0.1) 1678 self.cli = socket.socket(socket.AF_TIPC, socket.SOCK_STREAM) 1679 addr = (socket.TIPC_ADDR_NAME, TIPC_STYPE,ZMQ4.hs git://github.com/twittner/zeromq-haskell.git | Haskell | 1,007 lines
414-- action will /not/ be valid after the action terminates. 415withSocket :: SocketType a => Context -> a -> (Socket a -> IO b) -> IO b 416withSocket c t = bracket (socket c t) close 419-- automatic socket closing and may be safer to use. 420socket :: SocketType a => Context -> a -> IO (Socket a) 421socket c t = Socket <$> mkSocketRepr t c 605setMaxSockets :: Word -> Context -> IO () 606setMaxSockets n = setCtxIntOption "maxSockets" _maxSockets n 607 920 toZMQPoll (Sock s e _) = 921 ZMQPoll (_socket . _socketRepr . toSocket $ s) 0 (combine (map fromEvent e)) 0 922 986-- messages, received on both frontend and backend, to the capture socket. 987proxy :: Socket a -> Socket b -> Maybe (Socket c) -> IO () 988proxy front back capture =Monadic.hs git://github.com/twittner/zeromq-haskell.git | Haskell | 624 lines
212 , _context :: !Z.Context 213 , _sockets :: !(IORef [I.SocketRepr]) 214 } 225-- a particular 'ZMQ' thread. 226newtype Socket z t = Socket { _unsocket :: Z.Socket t } 227 312 313socket :: Z.SocketType t => t -> ZMQ z (Socket z t) 314socket t = ZMQ $ do 361 362proxy :: Socket z a -> Socket z b -> Maybe (Socket z c) -> ZMQ z () 363proxy a b c = liftIO $ Z.proxy (_unsocket a) (_unsocket b) (_unsocket <$> c) 368socketMonitor :: [Z.EventType] -> String -> Socket z t -> ZMQ z () 369socketMonitor es addr s = liftIO $ Z.socketMonitor es addr (_unsocket s) 370ZMQ.java https://bitbucket.org/mneagul/mosaic-java-platform | Java | 1,228 lines
65 66 // Socket types, used when creating a Socket. 67 /** 297 * The 'ZMQ_TYPE option shall retrieve the socket type for the specified 298 * 'socket'. The socket type is specified at socket creation time and 299 * cannot be modified afterwards. 994 995 this.sockets[pos] = socket; 996 this.events[pos] = (short) events; 1174 1175 this.sockets = new Socket [this.size]; 1176 this.events = new short [this.size]; 1194 */ 1195 private native long run_poll (int count, Socket [] sockets, short [] events, short [] revents, long timeout); 1196pkix_pl_socket.c https://bitbucket.org/dineshkummarc/mozilla-1.9.0-win64 | C | 1,724 lines
54 * 55 * Code to perform Socket tracing will be compiled in if PKIX_SOCKETTRACE 56 * is defined, but that doesn't mean socket tracing is active. Tracing also 522 PKIX_PL_NSSCALLRV(SOCKET, rv, PR_Connect, 523 (socket->clientSock, socket->netAddr, socket->timeout)); 524 575pkix_pl_Socket_ConnectContinue( 576 PKIX_PL_Socket *socket, 577 PRErrorCode *pStatus, 898 fileDesc = 899 (socket->isServer)?(socket->serverSock):(socket->clientSock); 900 1699{ 1700 PKIX_ENTER(SOCKET, "pkix_pl_Socket_GetCallbackList"); 1701 PKIX_NULLCHECK_TWO(socket, pCallbackList);test_ssl.py https://bitbucket.org/olemis/brython | Python | 2,156 lines
484 def test_dealloc_warn(self): 485 ss = ssl.wrap_socket(socket.socket(socket.AF_INET)) 486 r = repr(ss) 789 with support.transient_internet("svn.python.org"): 790 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 791 cert_reqs=ssl.CERT_REQUIRED, 897 ctx.load_verify_locations(capath=BYTES_CAPATH) 898 s = ctx.wrap_socket(socket.socket(socket.AF_INET)) 899 s.connect(("svn.python.org", 443)) 976 with support.transient_internet(remote[0]): 977 with ssl.wrap_socket(socket.socket(socket.AF_INET), 978 cert_reqs=ssl.CERT_NONE, ciphers="ALL") as s: 979 s.connect(remote) 980 with ssl.wrap_socket(socket.socket(socket.AF_INET), 981 cert_reqs=ssl.CERT_NONE, ciphers="DEFAULT") as s:test_socket.py https://bitbucket.org/olemis/brython | Python | 4,889 lines
47 try: 48 s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 49 except (AttributeError, socket.error, OSError): 124 def setUp(self): 125 self.s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 126 self.addCleanup(self.s.close) 1300 def testCreateSocket(self): 1301 with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s: 1302 pass 1309 # most systems limit IFNAMSIZ to 16, take 1024 to be sure 1310 with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s: 1311 self.assertRaisesRegex(socket.error, 'interface name too long', 1328 can_filter = struct.pack("=II", can_id, can_mask) 1329 with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s: 1330 s.setsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_FILTER, can_filter)gebr-comm-socket.c https://bitbucket.org/gebrproject/gebr | C | 457 lines
206 207void _gebr_comm_socket_init(GebrCommSocket * socket, int fd, enum GebrCommSocketAddressType address_type) 208{ 259 260void _gebr_comm_socket_emit_error(GebrCommSocket * socket, enum GebrCommSocketError error) 261{ 310 311enum GebrCommSocketState gebr_comm_socket_get_state(GebrCommSocket * socket) 312{ 330 331 _gebr_comm_socket_address_getsockname(&address, socket->address_type, _gebr_comm_socket_get_fd(socket)); 332 406 /* trick for lazyness */ 407 return gebr_comm_socket_read(socket, gebr_comm_socket_bytes_available(socket)); 408}test_mem_cache.rb https://github.com/fiveruns/memcache-client.git | Ruby | 805 lines
21 22class FakeSocket 23 52 @port = 11211 53 @socket = socket || FakeSocket.new 54 end 138 def test_cache_get_miss 139 socket = FakeSocket.new 140 socket.data.write "END\r\n" 696 def test_flush_all_failure 697 socket = FakeSocket.new 698 715 def test_stats 716 socket = FakeSocket.new 717 socket.data.write "STAT pid 20188\r\nSTAT total_items 32\r\nSTAT version 1.2.3\r\nSTAT rusage_user 1:300\r\nSTAT dummy ok\r\nEND\r\n"test_mem_cache.rb https://github.com/timurvafin/memcache-client.git | Ruby | 744 lines
15 16class FakeSocket 17 46 @port = 11211 47 @socket = socket || FakeSocket.new 48 end 107 def test_cache_get_miss 108 socket = FakeSocket.new 109 socket.data.write "END\r\n" 656 def test_flush_all_failure 657 socket = FakeSocket.new 658 socket.data.write "ERROR\r\n" 674 def test_stats 675 socket = FakeSocket.new 676 socket.data.write "STAT pid 20188\r\nSTAT total_items 32\r\nSTAT version 1.2.3\r\nSTAT rusage_user 1:300\r\nSTAT dummy ok\r\nEND\r\n"http_socket.test.php https://github.com/Dieterbe/cake.git | PHP | 1,311 lines
162/** 163 * Tests that HttpSocket::request (the heart of the HttpSocket) is working properly. 164 * 723 724 $r = $this->Socket->buildRequestLine(array('method' => 'GET', 'uri' => 'http://www.cakephp.org/search?q=socket')); 725 $this->assertIdentical($r, "GET /search?q=socket HTTP/1.1\r\n"); 899 900 $r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/search', 'query' => array('q' => 'HttpSocket'))); 901 $this->assertIdentical($r, 'http://www.cakephp.org/search?q=HttpSocket'); 1261/** 1262 * This tests asserts HttpSocket::reset() resets a HttpSocket instance to it's initial state (before Object::__construct 1263 * got executed) 1283/** 1284 * This tests asserts HttpSocket::reset(false) resets certain HttpSocket properties to their initial state (before 1285 * Object::__construct got executed).