PageRenderTime 51ms queryFilters 1ms Sphinxql 60ms app.CodeModel.GetByIds 176ms findMatchingLines 85ms GetByIds 261ms meta 0ms repositoryFilters 7ms languageFilters 12ms sourceFilters 4ms

626,242 results for 'socket repo:libvirt/autotest' (51 ms)

Source

Language

Repository

test_ssl.py https://bitbucket.org/python_mirrors/sandbox-gps-cpython | Python | 1,900 lines
665        with support.transient_internet("svn.python.org"):
666            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
667                                cert_reqs=ssl.CERT_REQUIRED,
747        with support.transient_internet("svn.python.org"):
748            ss = ssl.wrap_socket(socket.socket(socket.AF_INET))
749            ss.connect(("svn.python.org", 443))
812        with support.transient_internet(remote[0]):
813            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
814                                cert_reqs=ssl.CERT_NONE, ciphers="ALL")
815            s.connect(remote)
816            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
817                                cert_reqs=ssl.CERT_NONE, ciphers="DEFAULT")
835        with support.transient_internet("sha256.tbs-internet.com"):
836            s = ssl.wrap_socket(socket.socket(socket.AF_INET),
837                                cert_reqs=ssl.CERT_REQUIRED,
socket.rst https://bitbucket.org/python_mirrors/sandbox-gps-cpython | Unknown | 1,374 lines
1174   PORT = 50007              # Arbitrary non-privileged port
1175   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1176   s.bind((HOST, PORT))
1192   PORT = 50007              # The same port as used by the server
1193   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1194   s.connect((HOST, PORT))
1282   # create a raw socket and bind it to the public interface
1283   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1284   s.bind((HOST, 0))
1320   # create a raw socket and bind it to the `vcan0` interface
1321   s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
1322   s.bind(('vcan0',))
1349
1350   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1351   s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
game_server.js https://bitbucket.org/nehar/ti | JavaScript | 168 lines
58                socket.leave(socket.room);
59                io.sockets.to(socket.room).emit('updateUsers', getUsers(socket.room));
60                socket.room = socket.username;
62                io.sockets.to(socket.room).emit('updateUsers', getUsers(socket.room));
63                socket.broadcast.to(socket.room).emit('updateChat', 'SERVER', socket.username + ' stworzy? now? gr?');
64                socket.room = socket.username;
86				socket.emit('updateChat', 'SERVER', 'you have connected to ' + newroom);
87                io.sockets.to(socket.room).emit('updateUsers', getUsers(socket.room));
88                socket.broadcast.to(newroom).emit('updateChat', 'SERVER', socket.username + ' has joined this room');
125                    else{
126					socket.broadcast.to(socket.room).emit('updateChat', 'SERVER', socket.username + ' has disconnected');
127					}
128                    socket.leave(socket.room);
129                    io.sockets.to(socket.room).emit('updateUsers', getUsers(socket.room));
130                }
game.js https://bitbucket.org/nehar/ti | JavaScript | 284 lines
22                if (io.sockets.manager.rooms['/' + socket.room][i] === socket.id) {
23                    io.sockets.sockets[io.sockets.manager.rooms['/' + socket.room][i]].emit('startMap', map[socket.room], io.sockets.manager.rooms['/' + socket.room][(i + 1) % 2], socket.newtroops);
24                    io.sockets.sockets[socket.oponent].oponent = socket.id;
27                    socket.oponent = io.sockets.manager.rooms['/' + socket.room][i];
28                    io.sockets.sockets[io.sockets.manager.rooms['/' + socket.room][i]].emit('startMap', map[socket.room], io.sockets.manager.rooms['/' + socket.room][(i + 1) % 2], socket.newtroops);
29                }
46                socket.emit('troopsLeft', socket.newtroops);
47                if (socket.newtroops === 0 && io.sockets.sockets[socket.oponent].newtroops === 0) {
48                    socket.stopinterval = 0;
173
174            if (!isNaN(number) && socket.id === map[socket.room][from].owner && socket.id === map[socket.room][to].owner) {
175                if (map[socket.room][from].army.soldier[0] < number) {
275        if (i % 2 === 0) {
276            map[random[rand]].owner = io.sockets.sockets[io.sockets.manager.rooms['/' + socket.room][0]].id;
277        }
socket.rst https://bitbucket.org/python_mirrors/sandbox-regex-integration | Unknown | 1,376 lines
1176   PORT = 50007              # Arbitrary non-privileged port
1177   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1178   s.bind((HOST, PORT))
1194   PORT = 50007              # The same port as used by the server
1195   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1196   s.connect((HOST, PORT))
1284   # create a raw socket and bind it to the public interface
1285   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1286   s.bind((HOST, 0))
1322   # create a raw socket and bind it to the `vcan0` interface
1323   s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
1324   s.bind(('vcan0',))
1351
1352   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1353   s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
test_socket.py https://bitbucket.org/natim/cpython | Python | 2,089 lines
39    def setUp(self):
40        self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
41        self.port = support.bind_port(self.serv)
50    def setUp(self):
51        self.serv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
52        self.port = support.bind_port(self.serv)
608        # We know a socket should start without reuse==0
609        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
610        self.addCleanup(sock.close)
775    def test_dealloc_warn(self):
776        sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
777        r = repr(sock)
1029            self.serv.close()
1030            self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM |
1031                                                      socket.SOCK_NONBLOCK)
socket.rst https://bitbucket.org/natim/cpython | Unknown | 1,076 lines
765
766   Send data to the socket.  The socket must be connected to a remote socket.  The
767   optional *flags* argument has the same meaning as for :meth:`recv` above.
774
775   Send data to the socket.  The socket must be connected to a remote socket.  The
776   optional *flags* argument has the same meaning as for :meth:`recv` above.
935   PORT = 50007              # Arbitrary non-privileged port
936   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
937   s.bind((HOST, PORT))
953   PORT = 50007              # The same port as used by the server
954   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
955   s.connect((HOST, PORT))
1043   # create a raw socket and bind it to the public interface
1044   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1045   s.bind((HOST, 0))
test_sock_app.py https://bitbucket.org/vanl/pypy | Python | 798 lines
273    # fd needs to be somehow valid
274    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
275    fd = s.fileno()
382        import _socket
383        s = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM)
384        try:
560            skip('No dup() on this platform')
561        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
562        s.bind(('localhost', 0))
754        MSG = 'dupa was here\n'
755        cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
756        cli.connect(self.serv.getsockname())
779        import socket
780        cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
781        assert cli.family == socket.AF_INET
socket.c https://bitbucket.org/ChuloChumo/sctp_thesis | C | 2,463 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.
267{
268	struct socket_alloc *ei = (struct socket_alloc *)foo;
269
1184		if (net_ratelimit())
1185			printk(KERN_WARNING "socket: no more sockets\n");
1186		return -ENFILE;	/* Not exactly a match, but its the
2338
2339int kernel_accept(struct socket *sock, struct socket **newsock, int flags)
2340{
socket.c https://bitbucket.org/ChuloChumo/sctp_thesis | C | 1,902 lines
1/*
2 * net/tipc/socket.c: TIPC socket API
3 *
1812	.connect	= connect,
1813	.socketpair	= sock_no_socketpair,
1814	.accept		= accept,
1833	.connect	= connect,
1834	.socketpair	= sock_no_socketpair,
1835	.accept		= accept,
1861/**
1862 * tipc_socket_init - initialize TIPC socket interface
1863 *
1888/**
1889 * tipc_socket_stop - stop TIPC socket interface
1890 */
test_socket.py https://bitbucket.org/mandel/ntpath-performance | Python | 4,819 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)
1281    def testBindAny(self):
1282        with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
1283            s.bind(('', ))
1286        # most systems limit IFNAMSIZ to 16, take 1024 to be sure
1287        with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
1288            self.assertRaisesRegex(socket.error, 'interface name too long',
1293    def testLoopback(self):
1294        with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
1295            for loopback in (0, 1):
socket.rst https://bitbucket.org/schmichael/cpython-v2.6.8-nosslv2 | Unknown | 968 lines
703
704   Send data to the socket.  The socket must be connected to a remote socket.  The
705   optional *flags* argument has the same meaning as for :meth:`recv` above.
713
714   Send data to the socket.  The socket should not be connected to a remote socket,
715   since the destination socket is specified by *address*.  The optional *flags*
845   PORT = 50007              # Arbitrary non-privileged port
846   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
847   s.bind((HOST, PORT))
863   PORT = 50007              # The same port as used by the server
864   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
865   s.connect((HOST, PORT))
953   # create a raw socket and bind it to the public interface
954   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
955   s.bind((HOST, 0))
socket.rst https://bitbucket.org/carljm/cpython | Unknown | 1,341 lines
1141   PORT = 50007              # Arbitrary non-privileged port
1142   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1143   s.bind((HOST, PORT))
1159   PORT = 50007              # The same port as used by the server
1160   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1161   s.connect((HOST, PORT))
1249   # create a raw socket and bind it to the public interface
1250   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
1251   s.bind((HOST, 0))
1287   # create a raw socket and bind it to the `vcan0` interface
1288   s = socket.socket(socket.AF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
1289   s.bind(('vcan0',))
1316
1317   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1318   s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
test_sock_app.py https://bitbucket.org/chence/pypy | Python | 687 lines
353        import _socket
354        raises(_socket.error, _socket.socket, 10001, _socket.SOCK_STREAM, 0)
355
380        import _socket, os
381        s = _socket.socket(_socket.AF_INET, _socket.SOCK_STREAM, 0)
382        # it would be nice to have a test which works even if there is no
476        intsize = struct.calcsize('i')
477        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
478        reusestr = s.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR,
656        MSG = 'dupa was here\n'
657        cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
658        cli.connect(self.serv.getsockname())
669        import socket
670        cli = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
671        assert cli.family == socket.AF_INET
socket.rst https://bitbucket.org/jucacrispim/pydoc-br | Unknown | 1,018 lines
723
724   Send data to the socket.  The socket must be connected to a remote socket.  The
725   optional *flags* argument has the same meaning as for :meth:`recv` above.
876   PORT = 50007              # Arbitrary non-privileged port
877   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
878   s.bind((HOST, PORT))
894   PORT = 50007              # The same port as used by the server
895   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
896   s.connect((HOST, PORT))
984   # create a raw socket and bind it to the public interface
985   s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
986   s.bind((HOST, 0))
1011
1012   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
1013   s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
test_ssl.py https://bitbucket.org/benoitbryon/cpython | Python | 1,952 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")
842            ctx.load_verify_locations(sha256_cert)
843            s = ctx.wrap_socket(socket.socket(socket.AF_INET),
844                                server_hostname="sha256.tbs-internet.com")
test_socket.py https://bitbucket.org/benoitbryon/cpython | Python | 4,818 lines
46    try:
47        s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
48    except (AttributeError, socket.error, OSError):
123    def setUp(self):
124        self.s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
125        self.addCleanup(self.s.close)
1280    def testBindAny(self):
1281        with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
1282            s.bind(('', ))
1285        # most systems limit IFNAMSIZ to 16, take 1024 to be sure
1286        with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
1287            self.assertRaisesRegex(socket.error, 'interface name too long',
1292    def testLoopback(self):
1293        with socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW) as s:
1294            for loopback in (0, 1):
StandardSocketOption.java https://bitbucket.org/xiaoqiangnk/icedtea6 | Java | 371 lines
33 *
34 * <p> The {@link SocketOption#name name} of each socket option defined by this
35 * class is its field name.
112     * socket is bound or connected. Whether an implementation allows the
113     * socket send buffer to be changed after the socket is bound is system
114     * dependent.
314     * In particular, it is system dependent whether the loopback applies to
315     * multicast datagrams sent from the socket or received by the socket.
316     * For {@link StandardProtocolFamily#INET6 IPv6} sockets then it is
320     * <p> The initial/default value of this socket option is {@code TRUE}. An
321     * implementation allows this socket option to be set after the socket is
322     * bound. Whether the socket option can be queried or changed prior to
358
359    private static class StdSocketOption<T> implements SocketOption<T> {
360        private final String name;
http_socket.test.php https://bitbucket.org/meLego/snelcms | PHP | 1,478 lines
208	public function tearDown() {
209		unset($this->Socket, $this->RequestSocket);
210	}
972
973		$r = $this->Socket->buildRequestLine(array('method' => 'GET', 'uri' => 'http://www.cakephp.org/search?q=socket'));
974		$this->assertEquals($r, "GET /search?q=socket HTTP/1.1\r\n");
1187
1188		$r = $this->Socket->buildUri(array('host' => 'www.cakephp.org', 'path' => '/search', 'query' => array('q' => 'HttpSocket')));
1189		$this->assertEquals($r, 'http://www.cakephp.org/search?q=HttpSocket');
1427/**
1428 * This tests asserts HttpSocket::reset() resets a HttpSocket instance to it's initial state (before Object::__construct
1429 * got executed)
1450/**
1451 * This tests asserts HttpSocket::reset(false) resets certain HttpSocket properties to their initial state (before
1452 * Object::__construct got executed).
greenio_test.py https://bitbucket.org/flub/eventlet-queue | Python | 956 lines
344        killer = eventlet.spawn(accept_once, server)
345        client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
346        client.connect(('127.0.0.1', server.getsockname()[1]))
355        large_data = b'*' * 10 * min_buf_size()
356        listener = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
357        listener.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
383        server_evt = eventlet.spawn(server)
384        client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
385        client.connect(('127.0.0.1', listener.getsockname()[1]))
446        # stopped listening for doesn't result in an incorrect switch
447        server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
448        server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
592    def test_skip_nonblocking(self):
593        sock1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
594        fd = sock1.fd.fileno()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21