626,242 results for 'socket repo:fuggles/ucos' (33 ms)
test_ssl.py https://bitbucket.org/nbtaylor/pypy | Python | 1,370 lines
215 with test_support.transient_internet("svn.python.org"): 216 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 217 cert_reqs=ssl.CERT_NONE) 224 # this should fail because we have no verification certs 225 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 226 cert_reqs=ssl.CERT_REQUIRED) 234 # this should succeed because we specify the root cert 235 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 236 cert_reqs=ssl.CERT_REQUIRED, 258 with test_support.transient_internet("svn.python.org"): 259 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 260 cert_reqs=ssl.CERT_REQUIRED, 361 with test_support.transient_internet("sha256.tbs-internet.com"): 362 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 363 cert_reqs=ssl.CERT_REQUIRED,socket.wiki https://bitbucket.org/ursetto/rfc2553 | Unknown | 970 lines
31 32Socket objects. You construct a socket using the {{socket}} procedure, 33passing an address family {{af/*}} constant for FAMILY (IPv4, IPv6) and a 106; {{address}} : returns the address of a socket as a string (for Internet sockets, this is the IP address). 107; {{port}} : returns the socket port for Internet sockets; it is an error to call it on another type of socket. 108; {{path}} : returns the pathname for UNIX sockets, or an error for other socket types. 783 784Socket-level socket options for use with {{set-socket-option}} and 785{{get-socket-option}} at level {{sol/socket}}. 832 833Socket level constants, for use with {{set-socket-option}} and {{get-socket-option}}. 834 929; 0.2.3 : Set connectionless sockets to nonblocking 930; 0.2.2 : Fix segfault in {{socket-receive}}, {{socket-send}} and friends when socket argument was not a socket (reported by hypnocat) 931; 0.2.1 : Treat string {{addr}} arg to {{name-information}} as {{(inet-address addr #f)}}socket.scm https://bitbucket.org/ursetto/rfc2553 | Racket | 1,341 lines
576 (non-nil (integer->address-family (socket-family s)) (socket-family s)) 577 (non-nil (integer->socket-type (socket-type s)) (socket-type s)) 578 #;(non-nil (integer->protocol-type (socket-protocol s)) (socket-protocol s)) 673 'socket-connect err "cannot initiate connection" so saddr))))) 674 ;; perhaps socket address should be stored in socket object 675 (void))) 749 (network-error/errno 'socket-accept "could not accept from listener" so)) 750 (let ((so (make-socket s (socket-family so) (socket-type so) (socket-protocol so)))) 751 (unless (_make_socket_nonblocking s) 1092(define (socket-i/o-port->socket p) 1093 (%socket-port-data-socket (socket-port-data p))) 1094 1335 1336Socket type (slot 7) is deliberately set to "socket6" instead of "socket" to prevent 1337port->fileno from accessing port data (which is in a different format). This is hardcodedsocket-options.scm https://bitbucket.org/ursetto/rfc2553 | Racket | 395 lines
186 (##sys#check-exact val where) 187 (let ((s (if (socket? s) (socket-fileno s) s))) 188 (let ((err (setsockopt/int s level name val))) 260 261;; Get socket option on socket S at socket level LEVEL with option name NAME. 262;; If len is #f (the default) it assumes the option is an integer value. 362(define-boolean-option so-broadcast? sol/socket so/broadcast) 363;(define-socket-option so-linger sol/socket so/linger set-linger-option get-linger-option) 364(define-boolean-option so-oob-inline? sol/socket so/oobinline) 368(define-integer-option so-receive-low-water sol/socket so/rcvlowat) 369;(define-socket-option so-receive-timeout sol/socket so/rcvtimeo set-timeval-option get-timeval-option) 370;(define-socket-option so-send-timeout sol/socket so/sndtimeo set-timeval-option get-timeval-option) 370;(define-socket-option so-send-timeout sol/socket so/sndtimeo set-timeval-option get-timeval-option) 371(define-socket-option so-error sol/socket so/error set-readonly-option get-integer-option) 372(define-socket-option so-type sol/socket so/type set-readonly-option get-integer-option)test_ssl.py https://bitbucket.org/python_mirrors/releasing-2.7.3 | Python | 1,901 lines
666 with support.transient_internet("svn.python.org"): 667 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 668 cert_reqs=ssl.CERT_REQUIRED, 748 with support.transient_internet("svn.python.org"): 749 ss = ssl.wrap_socket(socket.socket(socket.AF_INET)) 750 ss.connect(("svn.python.org", 443)) 813 with support.transient_internet(remote[0]): 814 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 815 cert_reqs=ssl.CERT_NONE, ciphers="ALL") 816 s.connect(remote) 817 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 818 cert_reqs=ssl.CERT_NONE, ciphers="DEFAULT") 836 with support.transient_internet("sha256.tbs-internet.com"): 837 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 838 cert_reqs=ssl.CERT_REQUIRED,test_socket.py https://bitbucket.org/python_mirrors/releasing-2.7.3 | Python | 4,709 lines
42 try: 43 s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 44 except (AttributeError, socket.error, OSError): 119 def setUp(self): 120 self.s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 121 self.addCleanup(self.s.close) 1281 # most systems limit IFNAMSIZ to 16, take 1024 to be sure 1282 with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s: 1283 self.assertRaisesRegex(socket.error, 'interface name too long', 1288 def testLoopback(self): 1289 with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s: 1290 for loopback in (0, 1): 1300 can_filter = struct.pack("=II", can_id, can_mask) 1301 with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s: 1302 s.setsockopt(socket.SOL_CAN_RAW, socket.CAN_RAW_FILTER, can_filter)socket.rst https://bitbucket.org/python_mirrors/releasing-2.7.3 | Unknown | 1,383 lines
1183 PORT = 50007 # Arbitrary non-privileged port 1184 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1185 s.bind((HOST, PORT)) 1201 PORT = 50007 # The same port as used by the server 1202 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1203 s.connect((HOST, PORT)) 1291 # create a raw socket and bind it to the public interface 1292 s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP) 1293 s.bind((HOST, 0)) 1329 # create a raw socket and bind it to the 'vcan0' interface 1330 s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 1331 s.bind(('vcan0',)) 1358 1359 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1360 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)Socket.java https://bitbucket.org/nkabir/jdk-6 | Java | 1,595 lines
98 * a plain socket ignoring any other proxy configuration.</LI> 99 * <LI><code>Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("socks.mydom.com", 1080)));</code> 100 * will create a socket connecting through the specified SOCKS proxy 228 * <code>checkConnect</code> method doesn't allow the operation. 229 * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) 230 * @see java.net.SocketImpl 327 * <code>checkConnect</code> method doesn't allow the operation. 328 * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) 329 * @see java.net.SocketImpl 366 * <code>checkConnect</code> method doesn't allow the operation. 367 * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) 368 * @see java.net.SocketImpl 378 379 private Socket(SocketAddress address, SocketAddress localAddr, 380 boolean stream) throws IOException {DatagramSocket.java https://bitbucket.org/nkabir/jdk-6 | Java | 1,198 lines
216 * 217 * @exception SocketException if the socket could not be opened, 218 * or the socket could not bind to the specified local port. 224 */ 225 public DatagramSocket(SocketAddress bindaddr) throws SocketException { 226 // create a datagram socket. 1095 if (isClosed()) 1096 throw new SocketException("Socket is closed"); 1097 return ((Integer)(getImpl().getOption(SocketOptions.IP_TOS))).intValue(); 1159 * <p> 1160 * When an application creates a new datagram socket, the socket 1161 * implementation factory's <code>createDatagramSocketImpl</code> method is 1179 * @see 1180 java.net.DatagramSocketImplFactory#createDatagramSocketImpl() 1181 * @see SecurityManager#checkSetFactorytest_socket.py https://bitbucket.org/SeanTater/pypy-bugfix-st | Python | 1,632 lines
559 port = self._get_unused_port() 560 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 561 self.addCleanup(sock.close) 577 # We know a socket should start without reuse==0 578 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 579 self.addCleanup(sock.close) 1190 port = test_support.find_unused_port() 1191 cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1192 self.addCleanup(cli.close) 1432 address = "\x00python-test-hello\x00\xff" 1433 s1 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 1434 s1.bind(address) 1584 time.sleep(0.1) 1585 self.cli = socket.socket(socket.AF_TIPC, socket.SOCK_STREAM) 1586 addr = (socket.TIPC_ADDR_NAME, TIPC_STYPE,greenio_test.py https://bitbucket.org/temoto/eventlet | Python | 826 lines
280 def did_it_work(server): 281 client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 282 client.connect(('127.0.0.1', server.getsockname()[1])) 288 289 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 290 server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 387 388 listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 389 listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 708 server_coro = eventlet.spawn(server) 709 client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 710 client.connect(('127.0.0.1', listener.getsockname()[1])) 743 744 listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 745 listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)test_ssl.py https://bitbucket.org/kenial/portable-django | Python | 1,371 lines
215 with test_support.transient_internet("svn.python.org"): 216 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 217 cert_reqs=ssl.CERT_NONE) 224 # this should fail because we have no verification certs 225 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 226 cert_reqs=ssl.CERT_REQUIRED) 234 # this should succeed because we specify the root cert 235 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 236 cert_reqs=ssl.CERT_REQUIRED, 258 with test_support.transient_internet("svn.python.org"): 259 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 260 cert_reqs=ssl.CERT_REQUIRED, 361 with test_support.transient_internet("sha256.tbs-internet.com"): 362 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 363 cert_reqs=ssl.CERT_REQUIRED,test_socket.py https://bitbucket.org/kenial/portable-django | Python | 1,628 lines
556 port = self._get_unused_port() 557 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 558 self.addCleanup(sock.close) 574 # We know a socket should start without reuse==0 575 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 576 self.addCleanup(sock.close) 1187 port = test_support.find_unused_port() 1188 cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1189 self.addCleanup(cli.close) 1428 address = "\x00python-test-hello\x00\xff" 1429 s1 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 1430 s1.bind(address) 1580 time.sleep(0.1) 1581 self.cli = socket.socket(socket.AF_TIPC, socket.SOCK_STREAM) 1582 addr = (socket.TIPC_ADDR_NAME, TIPC_STYPE,test_ssl.py https://bitbucket.org/kenial/portable-django | Python | 1,371 lines
215 with test_support.transient_internet("svn.python.org"): 216 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 217 cert_reqs=ssl.CERT_NONE) 224 # this should fail because we have no verification certs 225 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 226 cert_reqs=ssl.CERT_REQUIRED) 234 # this should succeed because we specify the root cert 235 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 236 cert_reqs=ssl.CERT_REQUIRED, 258 with test_support.transient_internet("svn.python.org"): 259 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 260 cert_reqs=ssl.CERT_REQUIRED, 361 with test_support.transient_internet("sha256.tbs-internet.com"): 362 s = ssl.wrap_socket(socket.socket(socket.AF_INET), 363 cert_reqs=ssl.CERT_REQUIRED,test_socket.py https://bitbucket.org/kenial/portable-django | Python | 1,628 lines
556 port = self._get_unused_port() 557 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 558 self.addCleanup(sock.close) 574 # We know a socket should start without reuse==0 575 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 576 self.addCleanup(sock.close) 1187 port = test_support.find_unused_port() 1188 cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1189 self.addCleanup(cli.close) 1428 address = "\x00python-test-hello\x00\xff" 1429 s1 = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 1430 s1.bind(address) 1580 time.sleep(0.1) 1581 self.cli = socket.socket(socket.AF_TIPC, socket.SOCK_STREAM) 1582 addr = (socket.TIPC_ADDR_NAME, TIPC_STYPE,Socket.java https://bitbucket.org/bjzrccf/jdk6-jdk-mips | Java | 1,581 lines
98 * a plain socket ignoring any other proxy configuration.</LI> 99 * <LI><code>Socket s = new Socket(new Proxy(Proxy.Type.SOCKS, new InetSocketAddress("socks.mydom.com", 1080)));</code> 100 * will create a socket connecting through the specified SOCKS proxy 225 * <code>checkConnect</code> method doesn't allow the operation. 226 * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) 227 * @see java.net.SocketImpl 324 * <code>checkConnect</code> method doesn't allow the operation. 325 * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) 326 * @see java.net.SocketImpl 363 * <code>checkConnect</code> method doesn't allow the operation. 364 * @see java.net.Socket#setSocketImplFactory(java.net.SocketImplFactory) 365 * @see java.net.SocketImpl 375 376 private Socket(SocketAddress address, SocketAddress localAddr, 377 boolean stream) throws IOException {test_socket.py https://bitbucket.org/shashank/jython | Python | 2,509 lines
1644 socket.setdefaulttimeout(0.1) 1645 cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1646 host = '192.168.192.168' 2207 # And then try to bind again 2208 t = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 2209 t.bind( (HOST, PORT) ) 2266 def setUp(self): 2267 self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 2268 2271 def setUp(self): 2272 self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 2273 2325 def setUp(self): 2326 self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 2327test_sock_app.py https://bitbucket.org/jonathanslenders/pypy | Python | 689 lines
355 import _socket 356 raises(_socket.error, _socket.socket, 10001, _socket.SOCK_STREAM, 0) 357 470 # A socket sould start with reuse == 0 471 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 472 reuse = s.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) 478 intsize = struct.calcsize('i') 479 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 480 reusestr = s.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 658 MSG = 'dupa was here\n' 659 cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 660 cli.connect(self.serv.getsockname()) 671 import socket 672 cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 673 assert cli.family == socket.AF_INETgreenio_test.py https://bitbucket.org/portante/eventlet | Python | 803 lines
288 289 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 290 server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 296 297 server = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 298 server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 362 server_evt = eventlet.spawn(server) 363 client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 364 client.connect(('127.0.0.1', listener.getsockname()[1])) 685 server_coro = eventlet.spawn(server) 686 client = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 687 client.connect(('127.0.0.1', listener.getsockname()[1])) 720 721 listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 722 listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)socket.rst https://bitbucket.org/python_mirrors/features-pep-416 | Unknown | 1,383 lines
1183 PORT = 50007 # Arbitrary non-privileged port 1184 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1185 s.bind((HOST, PORT)) 1201 PORT = 50007 # The same port as used by the server 1202 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1203 s.connect((HOST, PORT)) 1291 # create a raw socket and bind it to the public interface 1292 s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP) 1293 s.bind((HOST, 0)) 1329 # create a raw socket and bind it to the `vcan0` interface 1330 s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW) 1331 s.bind(('vcan0',)) 1358 1359 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 1360 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)