PageRenderTime 245ms queryTime 55ms sortTime 10ms getByIdsTime 49ms findMatchingLines 25ms

100+ results results for 'socket' (245 ms)

Not the results you expected?
print-sctp.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 110 lines
                    
24  bionic/libc/include/pathconf.h bionic/libc/include/netdb.h \
                    
25  bionic/libc/include/sys/socket.h \
                    
26  bionic/libc/kernel/common/linux/socket.h \
                    
26  bionic/libc/kernel/common/linux/socket.h \
                    
27  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
28  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
78  bionic/libc/include/pathconf.h bionic/libc/include/netdb.h :
                    
79  bionic/libc/include/sys/socket.h :
                    
80  bionic/libc/kernel/common/linux/socket.h :
                    
80  bionic/libc/kernel/common/linux/socket.h :
                    
81  bionic/libc/kernel/arch-x86/asm/socket.h :
                    
82  bionic/libc/kernel/arch-x86/asm/sockios.h :
                    
                
send.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 68 lines
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../basic_raw_socket.html" title="basic_raw_socket">
                    
9<link rel="prev" href="reuse_address.html" title="basic_raw_socket::reuse_address">
                    
22<div class="spirit-nav">
                    
23<a accesskey="p" href="reuse_address.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_raw_socket.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="send/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
                    
24</div>
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_raw_socket.send"></a><a class="link" href="send.html" title="basic_raw_socket::send">basic_raw_socket::send</a>
                    
28</h4></div></div></div>
                    
36    <span class="keyword">const</span> <span class="identifier">ConstBufferSequence</span> <span class="special">&amp;</span> <span class="identifier">buffers</span><span class="special">);</span>
                    
37  <span class="emphasis"><em>&#187; <a class="link" href="send/overload1.html" title="basic_raw_socket::send (1 of 3 overloads)">more...</a></em></span>
                    
38
                    
40    <span class="keyword">typename</span> <a class="link" href="../ConstBufferSequence.html" title="Constant buffer sequence requirements">ConstBufferSequence</a><span class="special">&gt;</span>
                    
41<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="send/overload2.html" title="basic_raw_socket::send (2 of 3 overloads)">send</a><span class="special">(</span>
                    
42    <span class="keyword">const</span> <span class="identifier">ConstBufferSequence</span> <span class="special">&amp;</span> <span class="identifier">buffers</span><span class="special">,</span>
                    
                
workhorse_spec.rb https://gitlab.com/alexcern/gitlab-ce | Ruby | 454 lines
                    
99
                    
100  describe '.terminal_websocket' do
                    
101    def terminal(ca_pem: nil)
                    
125    context 'without ca_pem' do
                    
126      subject { described_class.terminal_websocket(terminal) }
                    
127
                    
131    context 'with ca_pem' do
                    
132      subject { described_class.terminal_websocket(terminal(ca_pem: "foo")) }
                    
133
                    
                
objects.lua https://gitlab.com/kidaa/Core3-CU.git | Lua | 455 lines
                    
86	snapToTerrain = 0,
                    
87	socketDestinations = {},
                    
88	structureFootprintFileName = "",
                    
145	snapToTerrain = 0,
                    
146	socketDestinations = {},
                    
147	structureFootprintFileName = "",
                    
204	snapToTerrain = 0,
                    
205	socketDestinations = {},
                    
206	structureFootprintFileName = "",
                    
263	snapToTerrain = 0,
                    
264	socketDestinations = {},
                    
265	structureFootprintFileName = "",
                    
322	snapToTerrain = 1,
                    
323	socketDestinations = {},
                    
324	structureFootprintFileName = "",
                    
                
znc.h https://gitlab.com/BGCX261/znc-msvc-svn-to-git.git | C Header | 278 lines
                    
17#endif
                    
18#include "Socket.h"
                    
19#include <map>
                    
137
                    
138	// Create a CIRCSocket. Return false if user cant connect
                    
139	bool ConnectUser(CUser *pUser);
                    
                
async_write_some.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 116 lines
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../basic_stream_socket.html" title="basic_stream_socket">
                    
9<link rel="prev" href="async_send/overload2.html" title="basic_stream_socket::async_send (2 of 2 overloads)">
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_stream_socket.async_write_some"></a><a class="link" href="async_write_some.html" title="basic_stream_socket::async_write_some">basic_stream_socket::async_write_some</a>
                    
28</h4></div></div></div>
                    
45<a name="boost_asio.reference.basic_stream_socket.async_write_some.h0"></a>
                    
46          <span class="phrase"><a name="boost_asio.reference.basic_stream_socket.async_write_some.parameters"></a></span><a class="link" href="async_write_some.html#boost_asio.reference.basic_stream_socket.async_write_some.parameters">Parameters</a>
                    
47        </h6>
                    
80<a name="boost_asio.reference.basic_stream_socket.async_write_some.h1"></a>
                    
81          <span class="phrase"><a name="boost_asio.reference.basic_stream_socket.async_write_some.remarks"></a></span><a class="link" href="async_write_some.html#boost_asio.reference.basic_stream_socket.async_write_some.remarks">Remarks</a>
                    
82        </h6>
                    
89<a name="boost_asio.reference.basic_stream_socket.async_write_some.h2"></a>
                    
90          <span class="phrase"><a name="boost_asio.reference.basic_stream_socket.async_write_some.example"></a></span><a class="link" href="async_write_some.html#boost_asio.reference.basic_stream_socket.async_write_some.example">Example</a>
                    
91        </h6>
                    
                
PipeWriter.java https://gitlab.com/opennars/opennars.git | Java | 211 lines
                    
22 * by the program.<br>
                    
23 * The implementation use a directory and temporary files for exchange message, so no need socket, and avoid in that way proxy
                    
24 * issue and other network issue.<br>
                    
                
ConnectionImpl.java https://gitlab.com/kidaa/incubator-geode.git | Java | 353 lines
                    
117    // socketBufferSize);
                    
118    theSocket.setSendBufferSize(socketBufferSize);
                    
119
                    
120    // Verify buffer sizes
                    
121    verifySocketBufferSize(socketBufferSize, theSocket.getReceiveBufferSize(), "receive");
                    
122    verifySocketBufferSize(socketBufferSize, theSocket.getSendBufferSize(), "send");
                    
125    out = SocketUtils.getOutputStream(theSocket);//theSocket.getOutputStream();
                    
126    in = SocketUtils.getInputStream(theSocket);//theSocket.getInputStream();
                    
127    this.status = handShake.greet(this, location, communicationMode);
                    
127    this.status = handShake.greet(this, location, communicationMode);
                    
128    commBuffer = ServerConnection.allocateCommBuffer(socketBufferSize, theSocket);
                    
129    if (sender != null) {
                    
130      commBufferForAsyncRead = ServerConnection
                    
131          .allocateCommBuffer(socketBufferSize, theSocket);
                    
132    }
                    
                
http.lua https://gitlab.com/kidaa/luvit.git | Lua | 448 lines
                    
61  end
                    
62  self.socket = socket
                    
63end
                    
73  local encode = codec.encoder()
                    
74  self.socket = socket
                    
75  self.encode = encode
                    
291
                    
292  local socket = options.socket or net.createConnection(self.port, self.host)
                    
293  local connect_emitter = options.connect_emitter or 'connect'
                    
294
                    
295  self.socket = socket
                    
296  socket:on('error',function(...) self:emit('error',...) end)
                    
298    self.connected = true
                    
299    self:emit('socket', socket)
                    
300
                    
                
ClientCacheFactoryJUnitTest.java https://gitlab.com/kidaa/incubator-geode.git | Java | 284 lines
                    
15import java.net.InetAddress;
                    
16import java.net.InetSocketAddress;
                    
17import java.net.URL;
                    
79    assertEquals(new ArrayList(), defPool.getLocators());
                    
80    assertEquals(Collections.singletonList(new InetSocketAddress(InetAddress.getLocalHost(),CacheServer.DEFAULT_PORT)), defPool.getServers());
                    
81
                    
116    assertEquals(new ArrayList(), defPool.getLocators());
                    
117    assertEquals(Collections.singletonList(new InetSocketAddress("localhost",CacheServer.DEFAULT_PORT)), defPool.getServers());
                    
118  }
                    
153      Pool proxyDefPool = ua.getPool();
                    
154      assertEquals(Collections.singletonList(new InetSocketAddress(InetAddress.getLocalHost(),CacheServer.DEFAULT_PORT)), proxyDefPool.getServers());
                    
155      assertEquals(true, proxyDefPool.getMultiuserAuthentication());
                    
191      Pool proxyDefPool = ua.getPool();
                    
192      assertEquals(Collections.singletonList(new InetSocketAddress(InetAddress.getLocalHost(),CacheServer.DEFAULT_PORT)), proxyDefPool.getServers());
                    
193      assertEquals(true, proxyDefPool.getMultiuserAuthentication());
                    
                
Channel.html https://gitlab.com/PNNutkung/Java-API.git | HTML | 283 lines
                    
102<dt>All Known Implementing Classes:</dt>
                    
103<dd><a href="../../../java/nio/channels/spi/AbstractInterruptibleChannel.html" title="class in java.nio.channels.spi">AbstractInterruptibleChannel</a>, <a href="../../../java/nio/channels/spi/AbstractSelectableChannel.html" title="class in java.nio.channels.spi">AbstractSelectableChannel</a>, <a href="../../../java/nio/channels/AsynchronousFileChannel.html" title="class in java.nio.channels">AsynchronousFileChannel</a>, <a href="../../../java/nio/channels/AsynchronousServerSocketChannel.html" title="class in java.nio.channels">AsynchronousServerSocketChannel</a>, <a href="../../../java/nio/channels/AsynchronousSocketChannel.html" title="class in java.nio.channels">AsynchronousSocketChannel</a>, <a href="../../../java/nio/channels/DatagramChannel.html" title="class in java.nio.channels">DatagramChannel</a>, <a href="../../../java/nio/channels/FileChannel.html" title="class in java.nio.channels">FileChannel</a>, <a href="../../../java/nio/channels/Pipe.SinkChannel.html" title="class in java.nio.channels">Pipe.SinkChannel</a>, <a href="../../../java/nio/channels/Pipe.SourceChannel.html" title="class in java.nio.channels">Pipe.SourceChannel</a>, <a href="../../../java/nio/channels/SelectableChannel.html" title="class in java.nio.channels">SelectableChannel</a>, <a href="../../../java/nio/channels/ServerSocketChannel.html" title="class in java.nio.channels">ServerSocketChannel</a>, <a href="../../../java/nio/channels/SocketChannel.html" title="class in java.nio.channels">SocketChannel</a></dd>
                    
104</dl>
                    
111 <p> A channel represents an open connection to an entity such as a hardware
                    
112 device, a file, a network socket, or a program component that is capable of
                    
113 performing one or more distinct I/O operations, for example reading or
                    
                
SearchEngineExternalCsw.java https://gitlab.com/pachecofgf/geoportal-server.git | Java | 452 lines
                    
156      LOG.log(Level.SEVERE, "Exception when Posting CSW query to "+url,e);
                    
157      if (e instanceof java.net.SocketTimeoutException) {
                    
158        throw new SearchException("catalog.search.error.searchTimeOut",e, 
                    
                
applicationFormFinalizePage.cpp https://gitlab.com/bjk/qpwmc.git | C++ | 461 lines
                    
138  filename = form->buildElementPath (QString (), "pwmdFilename", notFound);
                    
139  QString sock = form->buildElementPath (QString (), "pwmdSocket", notFound);
                    
140  qRegisterMetaType <Pwmd::ConnectionState>("Pwmd::ConnectionState");
                    
156        {
                    
157          pwm->setSocket (PwmdRemoteHost::socketUrl (hostData));
                    
158          pwm->setConnectParameters (hostData.socketArgs ());
                    
162                       hostData.sshNeedsPassphrase ());
                    
163          pwmd_setopt (pwm->handle (), PWMD_OPTION_SOCKET_TIMEOUT,
                    
164                       hostData.socketTimeout ());
                    
183      if (ownHandle)
                    
184        message (QString (tr ("Connecting to %1...")).arg (pwm->socket ()));
                    
185
                    
318    case Pwmd::Init:
                    
319      pwmd_setopt (pwm->handle (), PWMD_OPTION_SOCKET_TIMEOUT,
                    
320		   hostData.connectTimeout ());
                    
                
random.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 205 lines
                    
31  bionic/libc/kernel/arch-x86/asm/param.h \
                    
32  bionic/libc/include/sys/socket.h \
                    
33  bionic/libc/kernel/common/linux/socket.h \
                    
33  bionic/libc/kernel/common/linux/socket.h \
                    
34  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
35  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
133  bionic/libc/kernel/arch-x86/asm/param.h :
                    
134  bionic/libc/include/sys/socket.h :
                    
135  bionic/libc/kernel/common/linux/socket.h :
                    
135  bionic/libc/kernel/common/linux/socket.h :
                    
136  bionic/libc/kernel/arch-x86/asm/socket.h :
                    
137  bionic/libc/kernel/arch-x86/asm/sockios.h :
                    
                
BasePluggableTransport.java https://gitlab.com/kidaa/lantern.git | Java | 312 lines
                    
5import java.io.InputStream;
                    
6import java.net.InetSocketAddress;
                    
7import java.net.UnknownHostException;
                    
103    protected abstract void addClientArgs(CommandLine cmd,
                    
104            InetSocketAddress listenAddress,
                    
105            InetSocketAddress getModeAddress,
                    
105            InetSocketAddress getModeAddress,
                    
106            InetSocketAddress proxyAddress);
                    
107
                    
119            int listenPort,
                    
120            InetSocketAddress giveModeAddress);
                    
121
                    
126        LOGGER.info("Starting {} client", getLogName());
                    
127        InetSocketAddress listenAddress = new InetSocketAddress(
                    
128                getModeAddress.getAddress(),
                    
                
address.h https://gitlab.com/libnice/libnice.git | C Header | 307 lines
                    
59#include <sys/types.h>
                    
60#include <sys/socket.h>
                    
61#include <netinet/in.h>
                    
                
jwsJDBCTests.js https://gitlab.com/BGCX261/zlatnaspirala2-svn-to-git.git | JavaScript | 479 lines
                    
1//	---------------------------------------------------------------------------
                    
2//	jWebSocket TestSpecs for the JDBC Plug-in
                    
3//	(C) 2011 jWebSocket.org, Alexander Schulze, Innotrade GmbH, Herzogenrath
                    
21	
                    
22	TEST_TABLE: "jwebsocket_automated_test",
                    
23	TEST_STRING_1: "This is an automated demo text", 
                    
                
TestClientSocket.java https://gitlab.com/BGCX261/zjh-dev-svn-to-git.git | Java | 335 lines
                    
44	public static void testGetUserList(RSASecurityCoder rsaCoder,byte[] serverPublicKey,AESSecurityCoder aesCoder) throws Exception{
                    
45		Socket s=new Socket("127.0.0.1",8888);
                    
46		
                    
96	public static void testDispatch(RSASecurityCoder rsaCoder,byte[] serverPublicKey,AESSecurityCoder aesCoder) throws Exception{
                    
97		Socket s=new Socket("127.0.0.1",8888);
                    
98		
                    
150	public static void testLogout(RSASecurityCoder rsaCoder,byte[] serverPublicKey,AESSecurityCoder aesCoder) throws Exception{
                    
151		Socket s=new Socket("127.0.0.1",8888);
                    
152		
                    
202	public static void testLogin(RSASecurityCoder rsaCoder,byte[] serverPublicKey,AESSecurityCoder aesCoder) throws Exception{
                    
203		Socket s=new Socket("127.0.0.1",8888);
                    
204		
                    
255	public static void testRegister(RSASecurityCoder rsaCoder,byte[] serverPublicKey,AESSecurityCoder aesCoder) throws Exception{
                    
256		Socket s=new Socket("127.0.0.1",8888);
                    
257		
                    
                
pppopns.c https://gitlab.com/HRTKernel/Hacker_Kernel_SM-N910F.git | C | 525 lines
                    
18 * The socket is created in the kernel space and connected to the same address
                    
19 * of the control socket. Outgoing packets are always sent with sequences but
                    
20 * without acknowledgements. Incoming packets with sequences are reordered
                    
287
                    
288static int pppopns_connect(struct socket *sock, struct sockaddr *useraddr,
                    
289	int addrlen, int flags)
                    
295	struct socket *sock_tcp = NULL;
                    
296	struct socket *sock_raw = NULL;
                    
297	struct sock *sk_tcp;
                    
365
                    
366static int pppopns_release(struct socket *sock)
                    
367{
                    
420	.connect = pppopns_connect,
                    
421	.socketpair = sock_no_socketpair,
                    
422	.accept = sock_no_accept,
                    
                
fd_unix.go https://gitlab.com/sortix/gcc.git | Go | 518 lines
                    
85	case syscall.EINVAL:
                    
86		// On Solaris we can see EINVAL if the socket has
                    
87		// already been accepted and closed by the server.
                    
88		// Treat this as a successful connection--writes to
                    
89		// the socket will see EOF.  For details and a test
                    
90		// case in C see http://golang.org/issue/6828.
                    
106		// Performing multiple connect system calls on a
                    
107		// non-blocking socket under Unix variants does not
                    
108		// necessarily result in earlier errors being
                    
109		// returned. Instead, once runtime-integrated network
                    
110		// poller tells us that the socket is ready, get the
                    
111		// SO_ERROR socket option to see if the connection
                    
116		}
                    
117		nerr, err := syscall.GetsockoptInt(fd.sysfd, syscall.SOL_SOCKET, syscall.SO_ERROR)
                    
118		if err != nil {
                    
                
proftpd.php https://gitlab.com/jeremystevens/php-bin.git | PHP | 374 lines
                    
92            'ScoreboardFile', 'ServerAdmin', 'ServerIdent', 'ServerName',
                    
93            'ServerType', 'SetEnv', 'SocketBindTight', 'SocketOptions',
                    
94            'SyslogFacility', 'SyslogLevel', 'tcpBackLog', 'tcpNoDelay',
                    
                
keydb.h https://gitlab.com/metadevfoundation/ecos-ax-som-bf609.git | C Header | 178 lines
                    
128
                    
129/* socket table due to send PF_KEY messages. */
                    
130struct secreg {
                    
132
                    
133	struct socket *so;
                    
134};
                    
                
remote.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 527 lines
                    
7require 'metasm/os/main'
                    
8require 'socket'
                    
9
                    
234    when IO; @io = io
                    
235    when /^udp:(.*):(.*?)$/i; @io = UDPSocket.new ; @io.connect($1, $2)
                    
236    when /^(?:tcp:)?(.*):(.*?)$/i; @io = TCPSocket.open($1, $2)	# XXX matches C:\fail
                    
                
pjsuaAppUi.cpp https://gitlab.com/pjsip/pjproject.git | C++ | 370 lines
                    
213
                    
214	if (InitSymbSocket() != PJ_SUCCESS) {
                    
215	    PutMsg("Failed to initialize Symbian network param.");
                    
229    TRAPD(result, PjsuaDestroyL());
                    
230    DestroySymbSocket();
                    
231    CloseSTDLIB();
                    
242
                    
243static RSocketServ aSocketServer;
                    
244static RConnection aConn;
                    
301    
                    
302    // Initialize RSocketServ
                    
303    if ((err=aSocketServer.Connect(32)) != KErrNone) {
                    
318    pj_bzero(&sym_params, sizeof(sym_params));
                    
319    sym_params.rsocketserv = &aSocketServer;
                    
320    sym_params.rconnection = &aConn;
                    
                
peer.js https://gitlab.com/braydon/bitcore-p2p.git | JavaScript | 243 lines
                    
114    socket = peer._getSocket();
                    
115    socket.should.be.instanceof(Net.Socket);
                    
116
                    
119    peer2.proxy.port.should.equal(9050);
                    
120    socket = peer2._getSocket();
                    
121    socket.should.be.instanceof(Socks5Client);
                    
136
                    
137  it('relay error from socket', function(done) {
                    
138    var peer = new Peer({host: 'localhost'});
                    
150    peer.connect();
                    
151    peer.socket.emit('error', error);
                    
152  });
                    
156    var socket = new EventEmitter();
                    
157    socket.connect = sinon.stub();
                    
158    socket.destroy = sinon.stub();
                    
                
async_accept.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 66 lines
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../basic_socket_acceptor.html" title="basic_socket_acceptor">
                    
9<link rel="prev" href="assign/overload2.html" title="basic_socket_acceptor::assign (2 of 2 overloads)">
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_socket_acceptor.async_accept"></a><a class="link" href="async_accept.html" title="basic_socket_acceptor::async_accept">basic_socket_acceptor::async_accept</a>
                    
28</h4></div></div></div>
                    
34    <span class="keyword">typename</span> <a class="link" href="../Protocol.html" title="Protocol requirements">Protocol1</a><span class="special">,</span>
                    
35    <span class="keyword">typename</span> <a class="link" href="../SocketService.html" title="Socket service requirements">SocketService</a><span class="special">,</span>
                    
36    <span class="keyword">typename</span> <a class="link" href="../AcceptHandler.html" title="Accept handler requirements">AcceptHandler</a><span class="special">&gt;</span>
                    
43<span class="keyword">template</span><span class="special">&lt;</span>
                    
44    <span class="keyword">typename</span> <a class="link" href="../SocketService.html" title="Socket service requirements">SocketService</a><span class="special">,</span>
                    
45    <span class="keyword">typename</span> <a class="link" href="../AcceptHandler.html" title="Accept handler requirements">AcceptHandler</a><span class="special">&gt;</span>
                    
46<a class="link" href="../asynchronous_operations.html#boost_asio.reference.asynchronous_operations.return_type_of_an_initiating_function"><span class="emphasis"><em>void-or-deduced</em></span></a> <a class="link" href="async_accept/overload2.html" title="basic_socket_acceptor::async_accept (2 of 2 overloads)">async_accept</a><span class="special">(</span>
                    
47    <span class="identifier">basic_socket</span><span class="special">&lt;</span> <span class="identifier">protocol_type</span><span class="special">,</span> <span class="identifier">SocketService</span> <span class="special">&gt;</span> <span class="special">&amp;</span> <span class="identifier">peer</span><span class="special">,</span>
                    
48    <span class="identifier">endpoint_type</span> <span class="special">&amp;</span> <span class="identifier">peer_endpoint</span><span class="special">,</span>
                    
                
tou.cc https://gitlab.com/cave/RetroShare.git | C++ | 664 lines
                    
117/* 	open - allocates a sockfd, and checks that the type is okay */
                    
118int     tou_socket(uint32_t recvIdx, uint32_t type, int /*protocol*/)
                    
119{
                    
128	{
                    
129		std::cerr << "tou_socket() ERROR recvIdx greater than #receivers";
                    
130		std::cerr << std::endl;
                    
139	{
                    
140		std::cerr << "tou_socket() ERROR type doesn't match expected type";
                    
141		std::cerr << std::endl;
                    
                
supervision.js https://gitlab.com/exploitation.sm.eu/xucmgt.git | JavaScript | 171 lines
                    
167                Cti.setHandler(Cti.MessageType.LOGGEDON, loggedOnHandler);
                    
168                Cti.WebSocket.init(wsurl, username, 0);
                    
169            });
                    
                
l-os.lua https://gitlab.com/brcha/context-serbian.git | Lua | 463 lines
                    
24
                    
25-- os.sleep() => socket.sleep()
                    
26-- math.randomseed(tonumber(string.sub(string.reverse(tostring(math.floor(socket.gettime()*10000))),1,6)))
                    
42
                    
43math.initialseed = tonumber(string.sub(string.reverse(tostring(ceil(socket and socket.gettime()*10000 or time()))),1,6))
                    
44
                    
                
process.c https://gitlab.com/chandanpasunoori/io.js | C | 519 lines
                    
109
                    
110int uv__make_socketpair(int fds[2], int flags) {
                    
111#if defined(__linux__)
                    
116
                    
117  if (socketpair(AF_UNIX, SOCK_STREAM | UV__SOCK_CLOEXEC | flags, 0, fds) == 0)
                    
118    return 0;
                    
130
                    
131  if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds))
                    
132    return -errno;
                    
197    else
                    
198      return uv__make_socketpair(fds, 0);
                    
199
                    
                
inet_connection_sock.h https://gitlab.com/zeroepoch/android_kernel_amazon_sloane.git | C Header | 348 lines
                    
74 * @icsk_rto:		   Retransmit timeout
                    
75 * @icsk_pmtu_cookie	   Last pmtu seen by socket
                    
76 * @icsk_ca_ops		   Pluggable congestion control hook
                    
112		__u8		  pingpong;	 /* The session is interactive		   */
                    
113		__u8		  blocked;	 /* Delayed ACK was blocked by socket lock */
                    
114		__u32		  ato;		 /* Predicted tick of soft clock	   */
                    
                
client_app.js https://gitlab.com/projetos-dyad/nodeengineadmin | JavaScript | 306 lines
                    
9var tplProgress = null;
                    
10var socket      = null;
                    
11
                    
279
                    
280function conecta_websocket(){
                    
281    socket = io.connect('http://127.0.0.1:3000', {'force new connection': true});
                    
281    socket = io.connect('http://127.0.0.1:3000', {'force new connection': true});
                    
282    socket.on('connect', function(){
                    
283        console.log('Conectou ao server!');
                    
284    });
                    
285    socket.on('disconnect', function(){
                    
286        console.log('Desconectou do server!');
                    
287    });
                    
288    socket.on('error', function(){
                    
289        console.log('Erro!');
                    
                
queue2.js https://gitlab.com/Kamisama666/taxiserver | JavaScript | 383 lines
                    
8var msgid=1;
                    
9var requester = zmq.socket('req');
                    
10
                    
                
104-unused-variables.patch https://gitlab.com/likema/crosstool-ng.git | Patch | 178 lines
                    
35 #include <sys/param.h>
                    
36 #include <sys/socket.h>
                    
37diff --git a/sysdeps/ieee754/dbl-64/atnat2.h b/sysdeps/ieee754/dbl-64/atnat2.h
                    
                
HealthCheckerFactory.java https://gitlab.com/kidaa/helios.git | Java | 213 lines
                    
40import java.net.HttpURLConnection;
                    
41import java.net.InetSocketAddress;
                    
42import java.net.Socket;
                    
195
                    
196      InetSocketAddress address = new InetSocketAddress(dockerHost.address(), port);
                    
197      if (address.getAddress().isLoopbackAddress()) {
                    
200        final String bridge = docker.inspectContainer(containerId).networkSettings().gateway();
                    
201        address = new InetSocketAddress(bridge, port);
                    
202      }
                    
203
                    
204      try (final Socket s = new Socket()) {
                    
205        s.connect(address, CONNECT_TIMEOUT_MILLIS);
                    
                
s_cb.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 209 lines
                    
34  bionic/libc/kernel/arch-x86/asm/param.h bionic/libc/include/netdb.h \
                    
35  bionic/libc/include/sys/socket.h \
                    
36  bionic/libc/kernel/common/linux/socket.h \
                    
36  bionic/libc/kernel/common/linux/socket.h \
                    
37  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
38  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
138  bionic/libc/kernel/arch-x86/asm/param.h bionic/libc/include/netdb.h :
                    
139  bionic/libc/include/sys/socket.h :
                    
140  bionic/libc/kernel/common/linux/socket.h :
                    
140  bionic/libc/kernel/common/linux/socket.h :
                    
141  bionic/libc/kernel/arch-x86/asm/socket.h :
                    
142  bionic/libc/kernel/arch-x86/asm/sockios.h :
                    
                
clientconnection.cpp https://gitlab.com/lewkoo/ComMapScaleServer.git | C++ | 421 lines
                    
9
                    
10ClientConnection::ClientConnection(QTcpSocket* socket, QString id, QObject *parent) :
                    
11    QObject(parent), blockSize(0), clientSocket(socket)
                    
12{
                    
13    connect(socket, SIGNAL(readyRead()), this, SLOT(inDataReady()));
                    
14    connect (socket, SIGNAL(disconnected()), this, SLOT(disconnectClient()));
                    
21{
                    
22    if (clientSocket != NULL)
                    
23    {
                    
23    {
                    
24        delete clientSocket;
                    
25    }
                    
41    ((TcpServer*)parent())->removeClient(this);
                    
42    clientSocket->deleteLater();
                    
43    clientSocket = NULL;
                    
                
ResourceTable.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 209 lines
                    
70  frameworks/base/include/utils/ByteOrder.h /usr/include/netinet/in.h \
                    
71  /usr/include/sys/socket.h /usr/include/bits/socket.h \
                    
72  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
                    
72  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h \
                    
73  /usr/include/asm/sockios.h /usr/include/bits/socket2.h \
                    
74  /usr/include/bits/in.h /usr/include/bits/byteswap.h \
                    
174  frameworks/base/include/utils/ByteOrder.h /usr/include/netinet/in.h :
                    
175  /usr/include/sys/socket.h /usr/include/bits/socket.h :
                    
176  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h :
                    
176  /usr/include/bits/sockaddr.h /usr/include/asm/socket.h :
                    
177  /usr/include/asm/sockios.h /usr/include/bits/socket2.h :
                    
178  /usr/include/bits/in.h /usr/include/bits/byteswap.h :
                    
                
vireventglib.c https://gitlab.com/libvirt/libvirt.git | C | 499 lines
                    
151    if (events != 0) {
                    
152        data->source = virEventGLibAddSocketWatch(
                    
153            fd, cond, NULL, virEventGLibHandleDispatch, data, NULL);
                    
217
                    
218        data->source = virEventGLibAddSocketWatch(
                    
219            data->fd, cond, NULL, virEventGLibHandleDispatch, data, NULL);
                    
                
makentp.pm https://gitlab.com/qisback/xcat-core.git | Perl | 449 lines
                    
18use Data::Dumper;
                    
19use Socket;
                    
20
                    
                
init.qcom.factory.sh https://gitlab.com/doti2p/android-device-configuration-for-the-xiaomi-redmi-1s.git | Shell | 247 lines
                    
47
                    
48    #Create QMUX deamon socket area
                    
49    mkdir -p /dev/socket/qmux_radio
                    
49    mkdir -p /dev/socket/qmux_radio
                    
50    chown -h radio.radio /dev/socket/qmux_radio
                    
51    chmod -h 2770 /dev/socket/qmux_radio
                    
51    chmod -h 2770 /dev/socket/qmux_radio
                    
52    mkdir -p /dev/socket/qmux_audio
                    
53    chown -h media.audio /dev/socket/qmux_audio
                    
53    chown -h media.audio /dev/socket/qmux_audio
                    
54    chmod -h 2770 /dev/socket/qmux_audio
                    
55    mkdir -p /dev/socket/qmux_bluetooth
                    
55    mkdir -p /dev/socket/qmux_bluetooth
                    
56    chown -h bluetooth.bluetooth /dev/socket/qmux_bluetooth
                    
57    chmod -h 2770 /dev/socket/qmux_bluetooth
                    
                
tftp.c https://gitlab.com/kidaa/crossbridge.git | C | 426 lines
                    
39 * Assumes:
                    
40 *  - socket descriptor (int) at open_file->f_devdata
                    
41 *  - server host IP in global servip
                    
                
HASlowReceiverDUnitTest.java https://gitlab.com/kidaa/incubator-geode.git | Java | 281 lines
                    
9
                    
10import java.net.SocketException;
                    
11import java.util.Properties;
                    
29import com.gemstone.gemfire.internal.cache.BridgeObserverHolder;
                    
30import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
                    
31import dunit.DistributedTestCase;
                    
122
                    
123    int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
                    
124    BridgeServer server1 = cache.addBridgeServer();
                    
242    clientVM.invoke(HASlowReceiverDUnitTest.class, "registerInterest");
                    
243    // add expected socket exception string
                    
244    final ExpectedException ex1 = addExpectedException(SocketException.class
                    
                
nodes.h https://gitlab.com/ideasman42/blender.git | C Header | 655 lines
                    
194public:
                    
195	ConvertNode(ShaderSocketType from, ShaderSocketType to, bool autoconvert = false);
                    
196	SHADER_NODE_BASE_CLASS(ConvertNode)
                    
197
                    
198	ShaderSocketType from, to;
                    
199};
                    
202public:
                    
203	ProxyNode(ShaderSocketType type);
                    
204	SHADER_NODE_BASE_CLASS(ProxyNode)
                    
205
                    
206	ShaderSocketType type;
                    
207};
                    
619	/* ShaderInput/ShaderOutput only stores a shallow string copy (const char *)!
                    
620	 * The actual socket names have to be stored externally to avoid memory errors. */
                    
621	vector<ustring> input_names;
                    
                
dracut-logger.sh https://gitlab.com/harald-hoyer/dracut.git | Shell | 442 lines
                    
148            && type -P systemd-cat &>/dev/null \
                    
149            && systemctl --quiet is-active systemd-journald.socket &>/dev/null \
                    
150            && { echo "dracut-$DRACUT_VERSION" | systemd-cat -t 'dracut' &>/dev/null; } ; then
                    
                
engine_select.c https://gitlab.com/g10h4ck/nmap-gsoc2015.git | C | 394 lines
                    
5 *                                                                         *
                    
6 * The nsock parallel socket event library is (C) 1999-2015 Insecure.Com   *
                    
7 * LLC This library is free software; you may redistribute and/or          *
                    
129  /* The highest sd we have set in any of our fd_set's (max_sd + 1 is used in
                    
130   * select() calls).  Note that it can be -1, when there are no valid sockets */
                    
131  int max_sd;
                    
311      if (results_left == -1)
                    
312        sock_err = socket_errno();
                    
313    }
                    
318  if (results_left == -1 && sock_err != EINTR) {
                    
319    nsock_log_error("nsock_loop error %d: %s", sock_err, socket_strerror(sock_err));
                    
320    nsp->errnum = sock_err;
                    
                
znc.h https://gitlab.com/BGCX261/znc-msvc-svn-to-git.git | C Header | 194 lines
                    
15#include "Modules.h"
                    
16#include "Socket.h"
                    
17#include <map>
                    
143
                    
144	// Create a CIRCSocket. Return false if user cant connect
                    
145	bool ConnectUser(CUser *pUser);
                    
                
cvsrmmac.sh https://gitlab.com/BGCX261/zmail-2009-svn-to-git.git | Shell | 325 lines
                    
142cvs remove GUSISIOW.cp
                    
143cvs remove GUSISocket.cp
                    
144cvs remove GUSITCP.cp
                    
175cvs remove GUSIPPCTest.c.txt
                    
176cvs remove GUSISocketTest.c
                    
177cvs remove GUSISocketTest.c.txt
                    
218cvs remove sys:2Fioctl.h
                    
219cvs remove sys:2Fsocket.h
                    
220cvs remove sys:2Fstat.h
                    
229cvs remove sys_ioctl.h
                    
230cvs remove sys_socket.h
                    
231cvs remove sys_stat.h
                    
                
getnetbydns.c https://gitlab.com/kidaa/crossbridge.git | C | 465 lines
                    
63#include <sys/param.h>
                    
64#include <sys/socket.h>
                    
65#include <netinet/in.h>
                    
                
HttpProxyService.java https://gitlab.com/wenzhucjy/tomcat_source.git | Java | 368 lines
                    
19import org.apache.tomcat.lite.io.CBuffer;
                    
20import org.apache.tomcat.lite.io.SocketConnector;
                    
21
                    
62        if (ioConnector == null) {
                    
63            ioConnector = new SocketConnector();
                    
64        }
                    
                
config.h.in https://gitlab.com/linted/linted.git | Autoconf | 308 lines
                    
162
                    
163/* Define to 1 if you have the <[sys/socket.h]dnl> header file. */
                    
164#undef HAVE_SYS_SOCKET_H
                    
                
VerifyUpdatesFromNonInterestEndPointDUnitTest.java https://gitlab.com/kidaa/incubator-geode.git | Java | 248 lines
                    
7 */
                    
8package com.gemstone.gemfire.internal.cache.tier.sockets;
                    
9
                    
168        .setMinConnections(6)
                    
169        .setSocketBufferSize(32768)
                    
170        .setReadTimeout(2000)
                    
194    BridgeServer server1 = cache.addBridgeServer();
                    
195    int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET) ;
                    
196    server1.setPort(port);
                    
                
android_bluetooth_RfcommSocket.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 152 lines
                    
1 \
                    
2 out/target/product/g945/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_bluetooth_RfcommSocket.o:  \
                    
3 frameworks/base/core/jni/android_bluetooth_RfcommSocket.cpp \
                    
68  bionic/libc/kernel/common/asm-generic/fcntl.h \
                    
69  bionic/libc/include/sys/socket.h \
                    
70  bionic/libc/kernel/common/linux/socket.h \
                    
70  bionic/libc/kernel/common/linux/socket.h \
                    
71  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
72  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
77  bionic/libc/kernel/common/asm-generic/poll.h
                    
78 frameworks/base/core/jni/android_bluetooth_RfcommSocket.cpp :
                    
79  system/core/include/arch/target_linux-x86/AndroidConfig.h :
                    
143  bionic/libc/kernel/common/asm-generic/fcntl.h :
                    
144  bionic/libc/include/sys/socket.h :
                    
145  bionic/libc/kernel/common/linux/socket.h :
                    
                
android_bluetooth_HeadsetBase.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 152 lines
                    
68  bionic/libc/kernel/common/asm-generic/fcntl.h \
                    
69  bionic/libc/include/sys/socket.h \
                    
70  bionic/libc/kernel/common/linux/socket.h \
                    
70  bionic/libc/kernel/common/linux/socket.h \
                    
71  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
72  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
143  bionic/libc/kernel/common/asm-generic/fcntl.h :
                    
144  bionic/libc/include/sys/socket.h :
                    
145  bionic/libc/kernel/common/linux/socket.h :
                    
145  bionic/libc/kernel/common/linux/socket.h :
                    
146  bionic/libc/kernel/arch-x86/asm/socket.h :
                    
147  bionic/libc/kernel/arch-x86/asm/sockios.h :
                    
                
paramiko_ssh.py https://gitlab.com/lileeyao/ansible.git | Python | 341 lines
                    
28import pipes
                    
29import socket
                    
30import random
                    
232                            chan.sendall(self.runner.su_pass + '\n')
                    
233            except socket.timeout:
                    
234                raise errors.AnsibleError('ssh timed out waiting for sudo.\n' + sudo_output)
                    
                
localsocket.cpp https://gitlab.com/irggu-server/irggu-server.git | C++ | 302 lines
                    
46 */
                    
47LocalSocket::LocalSocket (QObject *parent) : QObject(parent)
                    
48{
                    
48{
                    
49    socket            = new QLocalSocket(this);
                    
50    uid               = 0;
                    
91 *
                    
92 * @param socketDescriptor Socket descriptor.
                    
93 * @return True if socket descriptor is accepted.
                    
94 */
                    
95bool LocalSocket::setSocketDescriptor (qintptr socketDescriptor)
                    
96{
                    
96{
                    
97    bool accepted = socket->setSocketDescriptor(socketDescriptor);
                    
98
                    
                
irc-bot.c https://gitlab.com/pir8g33k/Hercules.git | C | 489 lines
                    
19#include "../common/showmsg.h"
                    
20#include "../common/socket.h"
                    
21#include "../common/strlib.h"
                    
111 * Parser for the IRC server connection
                    
112 * @see do_sockets
                    
113 */
                    
                
ping.c https://gitlab.com/Team-OSE-old/SimpleKernel.git | C | 230 lines
                    
2 * INET		An implementation of the TCP/IP protocol suite for the LINUX
                    
3 *		operating system.  INET is implemented using the  BSD Socket
                    
4 *		interface as the means of communication with the user level.
                    
5 *
                    
6 *		"Ping" sockets
                    
7 *
                    
                
Constants.java https://gitlab.com/BGCX262/zz-ms-svn-to-git.git | Java | 181 lines
                    
50    //报文接口类型--socket
                    
51    public static final String MSG_INTERFACE_TYPE_SOCKET =          "SOCKET";
                    
52    //报文接口类型--hessian
                    
                
send.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 62 lines
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../basic_seq_packet_socket.html" title="basic_seq_packet_socket">
                    
9<link rel="prev" href="reuse_address.html" title="basic_seq_packet_socket::reuse_address">
                    
9<link rel="prev" href="reuse_address.html" title="basic_seq_packet_socket::reuse_address">
                    
10<link rel="next" href="send/overload1.html" title="basic_seq_packet_socket::send (1 of 2 overloads)">
                    
11</head>
                    
22<div class="spirit-nav">
                    
23<a accesskey="p" href="reuse_address.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_seq_packet_socket.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="send/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
                    
24</div>
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_seq_packet_socket.send"></a><a class="link" href="send.html" title="basic_seq_packet_socket::send">basic_seq_packet_socket::send</a>
                    
28</h4></div></div></div>
                    
30          <a class="indexterm" name="idp41204464"></a> 
                    
31Send some data on the socket.
                    
32        </p>
                    
                
426-pptp-segfault.patch https://gitlab.com/BGCX262/zyxel-keenetic-packages-svn-to-git.git | Patch | 164 lines
                    
23 	{
                    
24 		fatal("PPTP: failed to bind PPTP socket (%s)\n",strerror(errno));
                    
25+		close(pptp_fd);
                    
42 	{
                    
43 		fatal("PPTP: failed to connect PPTP socket (%s)\n",strerror(errno));
                    
44+		close(callmgr_sock);
                    
                
0001-implement-support-for-putty-s-pageant.patch https://gitlab.com/brcha/emerge.git | Patch | 489 lines
                    
82-#include "libssh/priv.h"
                    
83-#include "libssh/socket.h"
                    
84 #include "libssh/buffer.h"
                    
88+#include "libssh/priv.h"
                    
89+#include "libssh/socket.h"
                    
90 #include "libssh/poll.h"
                    
111+#ifndef _WIN32
                    
112 static size_t atomicio(ssh_socket s, void *buf, size_t n, int do_read) {
                    
113   char *b = buf;
                    
114   size_t pos = 0;
                    
115@@ -121,6 +129,7 @@ static size_t atomicio(ssh_socket s, void *buf, size_t n, int do_read) {
                    
116 
                    
127+#ifndef _WIN32
                    
128   agent->sock = ssh_socket_new(session);
                    
129   if (agent->sock == NULL) {
                    
                
iptables.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 144 lines
                    
19  bionic/libc/arch-x86/include/machine/kernel.h \
                    
20  bionic/libc/include/sys/sysmacros.h bionic/libc/include/sys/socket.h \
                    
21  bionic/libc/kernel/common/linux/socket.h \
                    
21  bionic/libc/kernel/common/linux/socket.h \
                    
22  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
23  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
90  bionic/libc/arch-x86/include/machine/kernel.h :
                    
91  bionic/libc/include/sys/sysmacros.h bionic/libc/include/sys/socket.h :
                    
92  bionic/libc/kernel/common/linux/socket.h :
                    
92  bionic/libc/kernel/common/linux/socket.h :
                    
93  bionic/libc/kernel/arch-x86/asm/socket.h :
                    
94  bionic/libc/kernel/arch-x86/asm/sockios.h :
                    
                
QueryOp.java https://gitlab.com/kidaa/incubator-geode.git | Java | 194 lines
                    
12import com.gemstone.gemfire.internal.cache.tier.MessageType;
                    
13import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
                    
14import com.gemstone.gemfire.internal.cache.tier.sockets.ChunkedMessage;
                    
14import com.gemstone.gemfire.internal.cache.tier.sockets.ChunkedMessage;
                    
15import com.gemstone.gemfire.internal.cache.tier.sockets.ObjectPartList;
                    
16import com.gemstone.gemfire.internal.cache.tier.sockets.Part;
                    
                
campaing_map.cpp https://gitlab.com/kidaa/FFXIOrgins.git | C++ | 70 lines
                    
23
                    
24#include "../../common/socket.h"
                    
25
                    
                
chat.html https://gitlab.com/lcp0578/zphpdemo.git | HTML | 137 lines
                    
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                    
5<title>swoole websocket chatroom</title>
                    
6<link href="static/css/bootstrap.css" rel="stylesheet">
                    
                
real_arcade_installerdlg.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 110 lines
                    
82    # Payload's URL
                    
83    payload_src  = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address(cli.peerhost) : datastore['SRVHOST']
                    
84    payload_src << ":" << datastore['SRVPORT'] << get_resource() + "/" + @payload_name + ".exe"
                    
                
ofxTCPServer.cpp https://gitlab.com/minotnepal/LearnOpenFrameworks.git | C++ | 320 lines
                    
304			ofMutex::ScopedLock Lock( mConnectionsLock );
                    
305			//	take owenership of socket from NewClient
                    
306			TCPConnections[acceptId] = client;
                    
                
endpoint.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 344 lines
                    
65                    The type of the endpoint structure. This type is dependent on
                    
66                    the underlying implementation of the socket layer.
                    
67                  </p>
                    
117                  <p>
                    
118                    Construct an endpoint from the specified socket address.
                    
119                  </p>
                    
299          The <a class="link" href="../generic__basic_endpoint.html" title="generic::basic_endpoint"><code class="computeroutput"><span class="identifier">generic</span><span class="special">::</span><span class="identifier">basic_endpoint</span></code></a> class template
                    
300          describes an endpoint that may be associated with any socket type.
                    
301        </p>
                    
306<p>
                    
307          The socket types sockaddr type must be able to fit into a <code class="computeroutput"><span class="identifier">sockaddr_storage</span></code> structure.
                    
308        </p>
                    
                
functions.php https://gitlab.com/qisback/xcat-core.git | PHP | 367 lines
                    
85
                    
86    // Open a socket to xcatd
                    
87    syslog(LOG_INFO, "Opening socket to xcatd...");
                    
87    syslog(LOG_INFO, "Opening socket to xcatd...");
                    
88    if ($fp = stream_socket_client('ssl://'.$xcathost.':'.$port, $errno, $errstr, 30, STREAM_CLIENT_CONNECT)){
                    
89        $reqXML = $req->asXML();
                    
163    } else {
                    
164        echo "<p>xCAT submit request socket error: $errno - $errstr</p>";
                    
165    }
                    
                
showlease.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 126 lines
                    
36  bionic/libc/arch-x86/include/endian.h bionic/libc/include/sys/endian.h \
                    
37  bionic/libc/kernel/common/linux/socket.h \
                    
38  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
55  bionic/libc/kernel/arch-x86/asm/param.h \
                    
56  bionic/libc/include/sys/socket.h bionic/libc/include/net/if.h \
                    
57  bionic/libc/kernel/common/linux/if.h \
                    
98  bionic/libc/arch-x86/include/endian.h bionic/libc/include/sys/endian.h :
                    
99  bionic/libc/kernel/common/linux/socket.h :
                    
100  bionic/libc/kernel/arch-x86/asm/socket.h :
                    
117  bionic/libc/kernel/arch-x86/asm/param.h :
                    
118  bionic/libc/include/sys/socket.h bionic/libc/include/net/if.h :
                    
119  bionic/libc/kernel/common/linux/if.h :
                    
                
adapter.ex https://gitlab.com/kidaa/phoenix.git | Elixir | 253 lines
                    
103
                    
104       websocket_serializer: Phoenix.Transports.JSONSerializer,
                    
105       websocket_timeout: :infinity
                    
                
errno.d https://gitlab.com/HardenedBSD/hardenedBSD-stable.git | D | 348 lines
                    
283	errno == EALREADY ?		"Operation already in progress" :
                    
284	errno == ENOTSOCK ?		"Socket operation on non-socket" :
                    
285	errno == EDESTADDRREQ ?		"Destination address required" :
                    
286	errno == EMSGSIZE ?		"Message too long" :
                    
287	errno == EPROTOTYPE ?		"Protocol wrong type for socket" :
                    
288	errno == ENOPROTOOPT ?		"Protocol not available" :
                    
289	errno == EPROTONOSUPPORT ?	"Protocol not supported" :
                    
290	errno == ESOCKTNOSUPPORT ?	"Socket type not supported" :
                    
291	errno == EOPNOTSUPP ?		"Operation not supported" :
                    
301	errno == ENOBUFS ?		"No buffer space available" :
                    
302	errno == EISCONN ?		"Socket is already connected" :
                    
303	errno == ENOTCONN ?		"Socket is not connected" :
                    
303	errno == ENOTCONN ?		"Socket is not connected" :
                    
304	errno == ESHUTDOWN ?		"Can't send after socket shutdown" :
                    
305	errno == ETOOMANYREFS ?		"Too many references: can't splice" :
                    
                
mini-rsa-psk.c https://gitlab.com/axil/gnutls.git | C | 347 lines
                    
35
                    
36/* socketpair isn't supported on Win32. */
                    
37int main(int argc, char **argv)
                    
45#include <sys/types.h>
                    
46#include <sys/socket.h>
                    
47#if !defined(_WIN32)
                    
320	pid_t child;
                    
321	int sockets[2];
                    
322
                    
322
                    
323	err = socketpair(AF_UNIX, SOCK_STREAM, 0, sockets);
                    
324	if (err == -1) {
                    
324	if (err == -1) {
                    
325		perror("socketpair");
                    
326		fail("socketpair failed\n");
                    
                
HDFSGatewayEventImpl.java https://gitlab.com/kidaa/incubator-geode.git | Java | 173 lines
                    
22import com.gemstone.gemfire.internal.cache.lru.Sizeable;
                    
23import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerHelper;
                    
24import com.gemstone.gemfire.internal.cache.versions.VersionTag;
                    
                
MultiHostTrackerPoolTest.java https://gitlab.com/kidaa/moji.git | Java | 168 lines
                    
24
                    
25import java.net.InetSocketAddress;
                    
26import java.util.Arrays;
                    
61  private List<ManagedTrackerHost> managedHosts;
                    
62  private InetSocketAddress address1;
                    
63  private InetSocketAddress address2;
                    
66  public void setup() {
                    
67    address1 = new InetSocketAddress(10001);
                    
68    address2 = new InetSocketAddress(10002);
                    
87    Set<InetSocketAddress> actual = trackerPool.getAddresses();
                    
88    Set<InetSocketAddress> expected = new HashSet<InetSocketAddress>(Arrays.asList(address1, address2));
                    
89    assertThat(actual, is(expected));
                    
                
ZKMRLOSCController.mm https://gitlab.com/BGCX261/zirkonium-git.git | Objective C++ | 457 lines
                    
18
                    
19static void ZKMRLOSCSocketCallback(CFSocketRef s, CFSocketCallBackType callbackType, CFDataRef address, const void *data, void *info)
                    
20{
                    
                
enhancements6.html https://gitlab.com/PNNutkung/Java-API.git | HTML | 339 lines
                    
98<li>
                    
99<p>Implementation of a SocketService</p>
                    
100</li>
                    
109the application to access the printer (if the user agreed). In 6.0
                    
110this is also done for socket connections, so that if an untrusted
                    
111application attempts to connect to a url, the user can be prompted
                    
                
ms11_019_electbowser.rb https://gitlab.com/leijianbin/metasploit-framework.git | Ruby | 175 lines
                    
59
                    
60    ip = Rex::Socket.source_address(datastore['RHOST'])
                    
61    ip_src = Rex::Socket.gethostbyname(ip)[3]
                    
                
TestFencing.java https://gitlab.com/math4youbyusgroupillinois/bookkeeper.git | Java | 398 lines
                    
24import org.junit.*;
                    
25import java.net.InetSocketAddress;
                    
26import java.util.Enumeration;
                    
268
                    
269        InetSocketAddress bookieToKill
                    
270            = writelh.getLedgerMetadata().getEnsemble(numEntries).get(0);
                    
321        // should be fenced by now
                    
322        InetSocketAddress bookieToKill
                    
323            = writelh.getLedgerMetadata().getEnsemble(numEntries).get(0);
                    
                
iwinfo_utils.c https://gitlab.com/naushit/witi-openwrt.git | C | 367 lines
                    
25
                    
26static int ioctl_socket = -1;
                    
27
                    
27
                    
28static int iwinfo_ioctl_socket(void)
                    
29{
                    
29{
                    
30	/* Prepare socket */
                    
31	if (ioctl_socket == -1)
                    
32	{
                    
33		ioctl_socket = socket(AF_INET, SOCK_DGRAM, 0);
                    
34		fcntl(ioctl_socket, F_SETFD, fcntl(ioctl_socket, F_GETFD) | FD_CLOEXEC);
                    
36
                    
37	return ioctl_socket;
                    
38}
                    
                
Server.java https://gitlab.com/wenzhucjy/tomcat_source.git | Java | 216 lines
                    
37 * <p>
                    
38 * In between, the implementation must open a server socket on the port number
                    
39 * specified by the <code>port</code> property.  When a connection is accepted,
                    
                
test-bind.c https://gitlab.com/libnice/libnice.git | C | 472 lines
                    
54#define alarm(...)
                    
55#define close closesocket
                    
56#else
                    
57#include <sys/types.h>
                    
58#include <sys/socket.h>
                    
59#include <arpa/inet.h>
                    
84  {
                    
85    int fd = socket (ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol);
                    
86    if (fd == -1)
                    
103
                    
104/** Incorrect socket family test */
                    
105static void bad_family (void)
                    
123
                    
124/** Too small socket address test */
                    
125static void small_srv_addr (void)
                    
                
basic_stream_socket.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 98 lines
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_stream_socket.basic_stream_socket"></a><a class="link" href="basic_stream_socket.html" title="basic_stream_socket::basic_stream_socket">basic_stream_socket::basic_stream_socket</a>
                    
28</h4></div></div></div>
                    
40        </p>
                    
41<pre class="programlisting"><a class="link" href="basic_stream_socket/overload2.html" title="basic_stream_socket::basic_stream_socket (2 of 6 overloads)">basic_stream_socket</a><span class="special">(</span>
                    
42    <span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_service</span> <span class="special">&amp;</span> <span class="identifier">io_service</span><span class="special">,</span>
                    
67        </p>
                    
68<pre class="programlisting"><a class="link" href="basic_stream_socket/overload5.html" title="basic_stream_socket::basic_stream_socket (5 of 6 overloads)">basic_stream_socket</a><span class="special">(</span>
                    
69    <span class="identifier">basic_stream_socket</span> <span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">);</span>
                    
72<p>
                    
73          Move-construct a <a class="link" href="../basic_stream_socket.html" title="basic_stream_socket"><code class="computeroutput"><span class="identifier">basic_stream_socket</span></code></a> from a socket
                    
74          of another protocol type.
                    
78    <span class="keyword">typename</span> <a class="link" href="../StreamSocketService.html" title="Stream socket service requirements">StreamSocketService1</a><span class="special">&gt;</span>
                    
79<a class="link" href="basic_stream_socket/overload6.html" title="basic_stream_socket::basic_stream_socket (6 of 6 overloads)">basic_stream_socket</a><span class="special">(</span>
                    
80    <span class="identifier">basic_stream_socket</span><span class="special">&lt;</span> <span class="identifier">Protocol1</span><span class="special">,</span> <span class="identifier">StreamSocketService1</span> <span class="special">&gt;</span> <span class="special">&amp;&amp;</span> <span class="identifier">other</span><span class="special">,</span>
                    
                
EngineTests.cs https://gitlab.com/latindignity/KestrelHttpServer.git | C# | 344 lines
                    
7using System.Net;
                    
8using System.Net.Sockets;
                    
9using System.Text;
                    
101            Console.WriteLine("Started");
                    
102            var socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
                    
103            socket.Connect(new IPEndPoint(IPAddress.Loopback, 54321));
                    
104            socket.Send(Encoding.ASCII.GetBytes("POST / HTTP/1.0\r\n\r\nHello World"));
                    
105            socket.Shutdown(SocketShutdown.Send);
                    
106            var buffer = new byte[8192];
                    
108            {
                    
109                var length = socket.Receive(buffer);
                    
110                if (length == 0) { break; }
                    
324            {
                    
325                var socket = new Socket(SocketType.Stream, ProtocolType.IP);
                    
326                socket.Connect(IPAddress.Loopback, 54321);
                    
                
mysqli_driver.php https://gitlab.com/lamptt/No-CMS.git | PHP | 484 lines
                    
108	{
                    
109		// Do we have a socket path?
                    
110		if ($this->hostname[0] === '/')
                    
113			$port = NULL;
                    
114			$socket = $this->hostname;
                    
115		}
                    
121			$port = empty($this->port) ? NULL : $this->port;
                    
122			$socket = NULL;
                    
123		}
                    
134		
                    
135		return $mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags)
                    
136			? $mysqli : FALSE;
                    
                
pwmd.c https://gitlab.com/bjk/fetchmail.git | C | 392 lines
                    
98
                    
99int connect_to_pwmd(const char *socketname, const char *socket_args,
                    
100		    const char *filename)
                    
108     * reopen the connection. */
                    
109    if (!pwm || (socketname && !pwmd_socket)
                    
110	    || (!socketname && pwmd_socket) ||
                    
110	    || (!socketname && pwmd_socket) ||
                    
111            (socketname && pwmd_socket && strcmp(socketname, pwmd_socket))
                    
112            || (socket_args && !pwmd_socket_args)
                    
113            || (!socket_args && pwmd_socket_args)
                    
114            || (socket_args && pwmd_socket_args
                    
115                && strcmp (socket_args, pwmd_socket_args))) {
                    
188    pwmd_socket = socketname;
                    
189    pwmd_socket_args = socket_args;
                    
190    pwmd_file = filename;
                    
                
iframe.htm https://gitlab.com/BGCX261/zlatnaspirala2-svn-to-git.git | HTML | 361 lines
                    
8		//	****************************************************************************
                    
9		//	jWebSocket Simple Chat (uses jWebSocket Client and Server)
                    
10		//	Copyright (c) 2010 Alexander Schulze, Innotrade GmbH, Herzogenrath
                    
25		<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
                    
26		<title>jWebSocket Chat Demo</title>
                    
27		<link rel="stylesheet" type="text/css" href="../../res/css/jwebsocket.css">
                    
27		<link rel="stylesheet" type="text/css" href="../../res/css/jwebsocket.css">
                    
28		<script src="../../res/js/jWebSocket.js" type="text/javascript"></script>
                    
29		<script src="../../res/js/jwsCanvasPlugIn.js" type="text/javascript"></script>
                    
32		<script type="text/javascript" language="JavaScript">
                    
33			var lJWSID = "jWebSocket Chat",
                    
34			lWSC = null,
                    
47			function doOpen() {
                    
48				// adjust this URL to your jWebSocket server
                    
49				var lURL = jws.getDefaultServerURL()
                    
                
lib-http-proxy-common-test.js https://gitlab.com/chandanpasunoori/node-http-proxy | JavaScript | 241 lines
                    
69            hostname  : 'how',
                    
70            socketPath: 'are',
                    
71            port      : 'you',
                    
215
                    
216  describe('#setupSocket', function () {
                    
217    it('should setup a socket', function () {
                    
217    it('should setup a socket', function () {
                    
218      var socketConfig = {
                    
219        timeout: null,
                    
222      },
                    
223      stubSocket = {
                    
224        setTimeout: function (num) {
                    
233      }
                    
234      returnValue = common.setupSocket(stubSocket);
                    
235
                    
                
tcpip.d https://gitlab.com/kreaz/secriot | D | 146 lines
                    
39 ../../../../core/./lib/memb.h ../../../../core/./lib/mmem.h \
                    
40 ../../../../core/./lib/random.h ../../../../core/./net/ip/udp-socket.h \
                    
41 ../../../../core/./net/ip/tcp-socket.h \
                    
112 ../../../../core/./lib/memb.h ../../../../core/./lib/mmem.h :
                    
113 ../../../../core/./lib/random.h ../../../../core/./net/ip/udp-socket.h :
                    
114 ../../../../core/./net/ip/tcp-socket.h :
                    
                
BridgeServerCreation.java https://gitlab.com/kidaa/incubator-geode.git | Java | 249 lines
                    
63    setNotifyBySubscription(other.getNotifyBySubscription());
                    
64    setSocketBufferSize(other.getSocketBufferSize());
                    
65    setTcpNoDelay(other.getTcpNoDelay());
                    
105  @Override
                    
106  public void setSocketBufferSize(int socketBufferSize) {
                    
107    this.socketBufferSize = socketBufferSize;
                    
110  @Override
                    
111  public int getSocketBufferSize() {
                    
112    return this.socketBufferSize;
                    
172        this.getPort() == other.getPort() &&
                    
173        this.getSocketBufferSize() == other.getSocketBufferSize() &&
                    
174        this.getMaximumTimeBetweenPings() == other.getMaximumTimeBetweenPings() &&
                    
197    " maximum time between pings " + this.getMaximumTimeBetweenPings() + 
                    
198    " socket buffer size " + this.getSocketBufferSize() + 
                    
199    " maximum connections " + this.getMaxConnections() +
                    
                
Smtp.php https://gitlab.com/israel.correa/Expresso.git | PHP | 443 lines
                    
50    /**
                    
51     * The transport method for the socket
                    
52     *
                    
205            $this->_expect(220, 180);
                    
206            if (!stream_socket_enable_crypto($this->_socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) {
                    
207                /**
                    
                
qlocale_blackberry.cpp https://gitlab.com/pteam/pteam-qtbase.git | C++ | 333 lines
                    
79    // called, the event dispatcher has not yet been created, causing the
                    
80    // subsequent call to QSocketNotifier constructor to fail.
                    
81    QMetaObject::invokeMethod(this, "installSocketNotifiers", Qt::QueuedConnection);
                    
139
                    
140    languageNotifier = new QSocketNotifier(languageFd, QSocketNotifier::Read, this);
                    
141    QObject::connect(languageNotifier, SIGNAL(activated(int)), this, SLOT(readLanguageLocale()));
                    
142
                    
143    regionNotifier = new QSocketNotifier(regionFd, QSocketNotifier::Read, this);
                    
144    QObject::connect(regionNotifier, SIGNAL(activated(int)), this, SLOT(readRegionLocale()));
                    
145
                    
146    measurementNotifier = new QSocketNotifier(measurementFd, QSocketNotifier::Read, this);
                    
147    QObject::connect(measurementNotifier, SIGNAL(activated(int)), this, SLOT(readMeasurementSystem()));
                    
148
                    
149    hourNotifier = new QSocketNotifier(hourFd, QSocketNotifier::Read, this);
                    
150    QObject::connect(hourNotifier, SIGNAL(activated(int)), this, SLOT(readHourFormat()));
                    
                
mod_cdr_rabbitmq.c https://gitlab.com/bratner/mod_cdr_rabbitmq.git | C | 350 lines
                    
38#include <amqp_framing.h>
                    
39#include <amqp_tcp_socket.h>
                    
40static struct {
                    
52	amqp_connection_state_t conn;
                    
53        amqp_socket_t* socket;
                    
54	switch_mutex_t *rabbitmq_mutex;
                    
177        }
                    
178        globals.socket = amqp_tcp_socket_new(globals.conn);
                    
179        if(!globals.socket){
                    
179        if(!globals.socket){
                    
180               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Failed to create Rabbitmq socket\n");
                    
181               amqp_destroy_connection(globals.conn);
                    
183        }
                    
184        status = amqp_socket_open(globals.socket, globals.rabbitmq_host, globals.rabbitmq_port);
                    
185        if(status){
                    
                
DynamicBrokersReader.java https://gitlab.com/kidaa/storm.git | Java | 178 lines
                    
31import java.io.UnsupportedEncodingException;
                    
32import java.net.SocketTimeoutException;
                    
33import java.util.List;
                    
72     */
                    
73    public GlobalPartitionInformation getBrokerInfo() throws SocketTimeoutException {
                    
74      GlobalPartitionInformation globalPartitionInformation = new GlobalPartitionInformation();
                    
88            }
                    
89        } catch (SocketTimeoutException e) {
                    
90					throw e;
                    
                
objects.lua https://gitlab.com/kidaa/Core3-CU.git | Lua | 357 lines
                    
87	snapToTerrain = 1,
                    
88	socketDestinations = {},
                    
89	structureFootprintFileName = "",
                    
150	snapToTerrain = 1,
                    
151	socketDestinations = {},
                    
152	structureFootprintFileName = "",
                    
213	snapToTerrain = 1,
                    
214	socketDestinations = {},
                    
215	structureFootprintFileName = "",
                    
276	snapToTerrain = 1,
                    
277	socketDestinations = {},
                    
278	structureFootprintFileName = "",
                    
339	snapToTerrain = 1,
                    
340	socketDestinations = {},
                    
341	structureFootprintFileName = "",
                    
                
DebugServer.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 218 lines
                    
85  external/webkit/WebKit/android/wds/Connection.h \
                    
86  bionic/libc/include/sys/socket.h \
                    
87  bionic/libc/kernel/common/linux/socket.h \
                    
87  bionic/libc/kernel/common/linux/socket.h \
                    
88  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
89  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
193  external/webkit/WebKit/android/wds/Connection.h :
                    
194  bionic/libc/include/sys/socket.h :
                    
195  bionic/libc/kernel/common/linux/socket.h :
                    
195  bionic/libc/kernel/common/linux/socket.h :
                    
196  bionic/libc/kernel/arch-x86/asm/socket.h :
                    
197  bionic/libc/kernel/arch-x86/asm/sockios.h :
                    
                
clif.h https://gitlab.com/evol/tmwa-evol | C Header | 287 lines
                    
10#else
                    
11#include <sys/socket.h>
                    
12#include <netinet/in.h>
                    
                
tool.rb https://gitlab.com/brcha/context-serbian.git | Ruby | 291 lines
                    
11require 'timeout'
                    
12require 'socket'
                    
13require 'rbconfig'
                    
280    def Tool.servername
                    
281        host = Socket::gethostname
                    
282        begin
                    
282        begin
                    
283            Socket::gethostbyname(host)[0]
                    
284        rescue
                    
                
netlogon.c https://gitlab.com/math4youbyusgroupillinois/samba.git | C | 200 lines
                    
24#include "nbt_server/nbt_server.h"
                    
25#include "lib/socket/socket.h"
                    
26#include <ldb.h>
                    
40				struct nbt_dgram_packet *packet, 
                    
41				const struct socket_address *src,
                    
42				struct nbt_netlogon_packet *netlogon)
                    
94				   struct nbt_dgram_packet *packet, 
                    
95				   const struct socket_address *src,
                    
96				   struct nbt_netlogon_packet *netlogon)
                    
106	if (!my_ip) {
                    
107		DEBUG(0, ("Could not obtain own IP address for datagram socket\n"));
                    
108		return;
                    
149				    struct nbt_dgram_packet *packet, 
                    
150				    struct socket_address *src)
                    
151{
                    
                
eipconnection.py https://gitlab.com/mcnair/mcnair-leap_client-fork.git | Python | 405 lines
                    
174
                    
175        host = eipconfig.get_socket_path()
                    
176        kwargs['host'] = host
                    
                
os.c https://gitlab.com/mcepl/acme-sac.git | C | 647 lines
                    
23
                    
24#include 	<sys/socket.h>
                    
25#include	<sched.h>
                    
                
InterArrival.java https://gitlab.com/bickelj/libjitsi.git | Java | 283 lines
                    
172                            "Packets are being reordered on the path from the "
                    
173                                + "socket to the bandwidth estimator. Ignoring "
                    
174                                + "this packet for bandwidth estimation.");
                    
                
stager.rb https://gitlab.com/JakenHerman/metasploit-framework.git | Ruby | 293 lines
                    
193  # an executable. The default is to simply attempt to create a session
                    
194  # on the given +conn+ socket with {Msf::Handler#create_session}.
                    
195  #
                    
                
RedundancyLevelPart3DUnitTest.java https://gitlab.com/kidaa/incubator-geode.git | Java | 239 lines
                    
7 */
                    
8package com.gemstone.gemfire.internal.cache.tier.sockets;
                    
9
                    
                
types_linux.go https://gitlab.com/leanlabsio/kanban.git | Go | 435 lines
                    
202
                    
203// Sockets
                    
204
                    
384
                    
385// Linux socket filter
                    
386
                    
                
DestroyOp.java https://gitlab.com/kidaa/incubator-geode.git | Java | 282 lines
                    
23import com.gemstone.gemfire.internal.cache.tier.MessageType;
                    
24import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
                    
25import com.gemstone.gemfire.internal.cache.tier.sockets.Part;
                    
                
client.go https://gitlab.com/leanlabsio/kanban.git | Go | 392 lines
                    
1// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
                    
2// Use of this source code is governed by a BSD-style
                    
4
                    
5package websocket
                    
6
                    
23// invalid.
                    
24var ErrBadHandshake = errors.New("websocket: bad handshake")
                    
25
                    
25
                    
26var errInvalidCompression = errors.New("websocket: invalid compression negotiation")
                    
27
                    
29// The URL u specifies the host and request URI. Use requestHeader to specify
                    
30// the origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies
                    
31// (Cookie). Use the response.Header to get the selected subprotocol
                    
31// (Cookie). Use the response.Header to get the selected subprotocol
                    
32// (Sec-WebSocket-Protocol) and cookies (Set-Cookie).
                    
33//
                    
                
close.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 51 lines
                    
3<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
                    
4<title>raw_socket_service::close</title>
                    
5<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../raw_socket_service.html" title="raw_socket_service">
                    
9<link rel="prev" href="cancel.html" title="raw_socket_service::cancel">
                    
9<link rel="prev" href="cancel.html" title="raw_socket_service::cancel">
                    
10<link rel="next" href="connect.html" title="raw_socket_service::connect">
                    
11</head>
                    
22<div class="spirit-nav">
                    
23<a accesskey="p" href="cancel.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../raw_socket_service.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="connect.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
                    
24</div>
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.raw_socket_service.close"></a><a class="link" href="close.html" title="raw_socket_service::close">raw_socket_service::close</a>
                    
28</h4></div></div></div>
                    
                
pqinetwork.h https://gitlab.com/cave/RetroShare.git | C Header | 131 lines
                    
35#include <sys/types.h>
                    
36#include <sys/socket.h>
                    
37#include <netinet/in.h>
                    
41
                    
42//socket blocking/options.
                    
43#include <fcntl.h>
                    
96
                    
97void showSocketError(std::string &out);
                    
98
                    
98
                    
99std::string socket_errorType(int err);
                    
100int sockaddr_cmp(struct sockaddr_in &addr1, struct sockaddr_in &addr2 );
                    
114
                    
115/* universal socket interface */
                    
116
                    
                
Listener.cpp https://gitlab.com/BGCX261/znc-msvc-svn-to-git.git | C++ | 125 lines
                    
72	m_eAcceptType = eAcceptType;
                    
73	// The socket will time out in 120 secs, no matter what.
                    
74	// This has to be fixed up later, if desired.
                    
                
adodb-errorhandler.inc.php https://gitlab.com/BGCX261/zion-downloads-css-svn-to-git.git | PHP | 91 lines
                    
63	*		In this case, the destination parameter specifies the host name or IP address
                    
64	*		and optionally, port number, of the socket receiving the debug information.
                    
65	*	3 message is appended to the file destination
                    
                
sock-serv.c https://gitlab.com/karllinden/mradio | C | 297 lines
                    
35#include <string.h>
                    
36#include <sys/socket.h>
                    
37#include <sys/stat.h>
                    
215
                    
216    sockserv->fd = socket(sockinfo.sockaddr.addr.sa_family, SOCK_STREAM,
                    
217                          0);
                    
218    if (sockserv->fd < 0) {
                    
219        log_fatal_errno("could not create socket");
                    
220        goto error;
                    
227    if (bind(sockserv->fd, &sockinfo.sockaddr.addr, sockinfo.size)) {
                    
228        log_fatal_errno("could not bind socket");
                    
229        goto error;
                    
233    if (listen(sockserv->fd, SOCK_SERV_LISTEN_BACKLOG)) {
                    
234        log_fatal_errno("could not listen on control socket");
                    
235        goto error;
                    
                
non-standard-hyphenation-german.tex https://gitlab.com/sh2d/padrinoma.git | LaTeX | 258 lines
                    
43\noindent\begin{tabular*}{\linewidth}{l@{\extracolsep{\fill}}r}
                    
44  \emph{Steck-dose}, not Stek-kdose & (socket)\\
                    
45  \emph{Rohstoff-industrie}, not Rohstoff-findustrie & (extractive industry)\\
                    
                
cfg_client.c https://gitlab.com/mdimjasevic/IKEv2.git | C | 411 lines
                    
22#endif /* HAVE_STRING_H */
                    
23#ifdef HAVE_SYS_SOCKET_H
                    
24#include <sys/socket.h>
                    
24#include <sys/socket.h>
                    
25#endif /* HAVE_SYS_SOCKET_H */
                    
26#ifdef HAVE_SYS_TYPES_H
                    
                
reuse_address.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 87 lines
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../basic_socket_acceptor.html" title="basic_socket_acceptor">
                    
9<link rel="prev" href="receive_low_watermark.html" title="basic_socket_acceptor::receive_low_watermark">
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_socket_acceptor.reuse_address"></a><a class="link" href="reuse_address.html" title="basic_socket_acceptor::reuse_address">basic_socket_acceptor::reuse_address</a>
                    
28</h4></div></div></div>
                    
33          <a class="indexterm" name="idp46510432"></a> 
                    
34Socket option to allow the socket to
                    
35          be bound to an address that is already in use.
                    
43<a name="boost_asio.reference.basic_socket_acceptor.reuse_address.h0"></a>
                    
44          <span class="phrase"><a name="boost_asio.reference.basic_socket_acceptor.reuse_address.examples"></a></span><a class="link" href="reuse_address.html#boost_asio.reference.basic_socket_acceptor.reuse_address.examples">Examples</a>
                    
45        </h6>
                    
64<a name="boost_asio.reference.basic_socket_acceptor.reuse_address.h1"></a>
                    
65          <span class="phrase"><a name="boost_asio.reference.basic_socket_acceptor.reuse_address.requirements"></a></span><a class="link" href="reuse_address.html#boost_asio.reference.basic_socket_acceptor.reuse_address.requirements">Requirements</a>
                    
66        </h6>
                    
                
send_low_watermark.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 87 lines
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_seq_packet_socket.send_low_watermark"></a><a class="link" href="send_low_watermark.html" title="basic_seq_packet_socket::send_low_watermark">basic_seq_packet_socket::send_low_watermark</a>
                    
28</h4></div></div></div>
                    
39<p>
                    
40          Implements the SOL_SOCKET/SO_SNDLOWAT socket option.
                    
41        </p>
                    
43<a name="boost_asio.reference.basic_seq_packet_socket.send_low_watermark.h0"></a>
                    
44          <span class="phrase"><a name="boost_asio.reference.basic_seq_packet_socket.send_low_watermark.examples"></a></span><a class="link" href="send_low_watermark.html#boost_asio.reference.basic_seq_packet_socket.send_low_watermark.examples">Examples</a>
                    
45        </h6>
                    
56        </p>
                    
57<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span> <span class="identifier">socket</span><span class="special">(</span><span class="identifier">io_service</span><span class="special">);</span>
                    
58<span class="special">...</span>
                    
64<a name="boost_asio.reference.basic_seq_packet_socket.send_low_watermark.h1"></a>
                    
65          <span class="phrase"><a name="boost_asio.reference.basic_seq_packet_socket.send_low_watermark.requirements"></a></span><a class="link" href="send_low_watermark.html#boost_asio.reference.basic_seq_packet_socket.send_low_watermark.requirements">Requirements</a>
                    
66        </h6>
                    
                
receive_low_watermark.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 87 lines
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_raw_socket.receive_low_watermark"></a><a class="link" href="receive_low_watermark.html" title="basic_raw_socket::receive_low_watermark">basic_raw_socket::receive_low_watermark</a>
                    
28</h4></div></div></div>
                    
39<p>
                    
40          Implements the SOL_SOCKET/SO_RCVLOWAT socket option.
                    
41        </p>
                    
43<a name="boost_asio.reference.basic_raw_socket.receive_low_watermark.h0"></a>
                    
44          <span class="phrase"><a name="boost_asio.reference.basic_raw_socket.receive_low_watermark.examples"></a></span><a class="link" href="receive_low_watermark.html#boost_asio.reference.basic_raw_socket.receive_low_watermark.examples">Examples</a>
                    
45        </h6>
                    
56        </p>
                    
57<pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span> <span class="identifier">socket</span><span class="special">(</span><span class="identifier">io_service</span><span class="special">);</span>
                    
58<span class="special">...</span>
                    
64<a name="boost_asio.reference.basic_raw_socket.receive_low_watermark.h1"></a>
                    
65          <span class="phrase"><a name="boost_asio.reference.basic_raw_socket.receive_low_watermark.requirements"></a></span><a class="link" href="receive_low_watermark.html#boost_asio.reference.basic_raw_socket.receive_low_watermark.requirements">Requirements</a>
                    
66        </h6>
                    
                
KeyChainKeyManager.java https://gitlab.com/bjk/qpwmc.git | Java | 203 lines
                    
3
                    
4import java.net.Socket;
                    
5import java.security.Principal;
                    
100    @Override
                    
101    public String chooseClientAlias(String[] keyTypes, Principal[] issuers, Socket socket) {
                    
102        return chooseAlias(keyTypes, issuers);
                    
115    @Override
                    
116    public String chooseServerAlias(String keyType, Principal[] issuers, Socket socket) {
                    
117        return chooseAlias(new String[] { keyType }, issuers);
                    
                
send_to.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 71 lines
                    
7<link rel="home" href="../../../boost_asio.html" title="Boost.Asio">
                    
8<link rel="up" href="../basic_datagram_socket.html" title="basic_datagram_socket">
                    
9<link rel="prev" href="send_low_watermark.html" title="basic_datagram_socket::send_low_watermark">
                    
9<link rel="prev" href="send_low_watermark.html" title="basic_datagram_socket::send_low_watermark">
                    
10<link rel="next" href="send_to/overload1.html" title="basic_datagram_socket::send_to (1 of 3 overloads)">
                    
11</head>
                    
22<div class="spirit-nav">
                    
23<a accesskey="p" href="send_low_watermark.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../basic_datagram_socket.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../boost_asio.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="send_to/overload1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
                    
24</div>
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_datagram_socket.send_to"></a><a class="link" href="send_to.html" title="basic_datagram_socket::send_to">basic_datagram_socket::send_to</a>
                    
28</h4></div></div></div>
                    
34    <span class="keyword">typename</span> <a class="link" href="../ConstBufferSequence.html" title="Constant buffer sequence requirements">ConstBufferSequence</a><span class="special">&gt;</span>
                    
35<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <a class="link" href="send_to/overload1.html" title="basic_datagram_socket::send_to (1 of 3 overloads)">send_to</a><span class="special">(</span>
                    
36    <span class="keyword">const</span> <span class="identifier">ConstBufferSequence</span> <span class="special">&amp;</span> <span class="identifier">buffers</span><span class="special">,</span>
                    
                
end.html https://gitlab.com/PNNutkung/Java-API.git | HTML | 496 lines
                    
9        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
                    
10        <meta name="description" content="This networking Java tutorial describes networking capabilities of the Java platform, working with URLs, sockets, datagrams, and cookies" />
                    
11        <meta name="keywords" content="java programming, learn java, java sample code, java networking, java url, java socket, datagram, java cookie" />
                    
                
RegisterInterestList66.java https://gitlab.com/kidaa/incubator-geode.git | Java | 258 lines
                    
10 */
                    
11package com.gemstone.gemfire.internal.cache.tier.sockets.command;
                    
12
                    
18import com.gemstone.gemfire.internal.cache.tier.MessageType;
                    
19import com.gemstone.gemfire.internal.cache.tier.sockets.*;
                    
20import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
                    
136    if (logger.isDebugEnabled()) {
                    
137      logger.debug("{}: Received register interest 66 request ({} bytes) from {} for the following {} keys in region {}: {}", servConn.getName(), msg.getPayloadLength(), servConn.getSocketString(), numberOfKeys, regionName, keys);
                    
138    }
                    
                
TCP.java https://gitlab.com/kidaa/incubator-geode.git | Java | 308 lines
                    
29 * TCP based protocol. Creates a server socket, which gives us the local address of this group member. For
                    
30 * each accept() on the server socket, a new thread is created that listens on the socket.
                    
31 * For each outgoing message m, if m.dest is in the ougoing hashtable, the associated socket will be reused
                    
31 * For each outgoing message m, if m.dest is in the ougoing hashtable, the associated socket will be reused
                    
32 * to send message, otherwise a new socket is created and put in the hashtable.
                    
33 * When a socket connection breaks or a member is removed from the group, the corresponding items in the
                    
59    int                    send_buf_size=150000;
                    
60    int                    sock_conn_timeout=2000; // max time in millis for a socket creation in ConnectionTable
                    
61
                    
179        ct.setSendBufferSize(send_buf_size);
                    
180        ct.setSocketConnectionTimeout(sock_conn_timeout);
                    
181        local_addr=ct.getLocalAddress();
                    
                
WifiStateChangeService.java https://gitlab.com/pserwylo/fdroidclient.git | Java | 320 lines
                    
29import java.net.NetworkInterface;
                    
30import java.net.SocketException;
                    
31import java.security.cert.Certificate;
                    
285            }
                    
286        } catch (SocketException e) {
                    
287            Log.e(TAG, "Could not get ip address", e);
                    
                
ConnectionProvider-pm.html https://gitlab.com/p-ms/pms-docs.git | HTML | 57 lines
                    
13
                    
14<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Pms.Core.ConnectionProvider"></a>Pms::<wbr>Core::<wbr>ConnectionProvider</h1><div class=CBody><div class=ClassHierarchy><table border=0 cellspacing=0 cellpadding=0><tr><td><div class=CHParent><div class=CHEntry><a href="Object-pm.html#Pms.Core.Object" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">Pms::Core::Object</a></div></div></td></tr></table><div class=CHIndent><table border=0 cellspacing=0 cellpadding=0><tr><td><div class=CHCurrent><div class=CHEntry>Pms::Core::ConnectionProvider</div></div></td></tr></table><div class=CHIndent><table border=0 cellspacing=0 cellpadding=0><tr><td><div class=CHChild><div class=CHEntry><a href="../Net/WebSocket/ConnectionProvider-pm.html#Pms.Net.WebSocket.ConnectionProvider" class=LClass >Pms::Net::WebSocket::ConnectionProvider</a></div></div></td></tr></table></div></div></div><h4 class=CHeading>Description</h4><p>Implements the base class for all ConnectionProviders.&nbsp; A ConnectionProvider is a object that can accept incoming connection on a special device for example a Socket or a HTTP Request.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Pms.Core.ConnectionProvider" >Pms::<wbr>Core::<wbr>ConnectionProvider</a></td><td class=SDescription>Implements the base class for all ConnectionProviders. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.Signals" >Signals</a></td><td class=SDescription></td></tr><tr class="SSignal SIndent2 SMarked"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.connectionAvailable" >connectionAvailable()</a></td><td class=SDescription>is emitted when a new connection is enqueued</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.PmsEvents" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">%PmsEvents</a></td><td class=SDescription>See <a href="Object-pm.html#Pms.Core.Object" class=LClass id=link3 onMouseOver="ShowTip(event, 'tt1', 'link3')" onMouseOut="HideTip('tt1')">Pms::Core::Object</a></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.new" id=link4 onMouseOver="ShowTip(event, 'tt3', 'link4')" onMouseOut="HideTip('tt3')">new</a></td><td class=SDescription>Initializes the Object</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.nextConnection" id=link5 onMouseOver="ShowTip(event, 'tt4', 'link5')" onMouseOut="HideTip('tt4')">nextConnection</a></td><td class=SDescription>Returns the next pending connection in the queue</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.connectionAvailable" >connectionAvailable</a></td><td class=SDescription>Checks if there are pending connections</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#Pms.Core.ConnectionProvider.connectionsAvailable" id=link6 onMouseOver="ShowTip(event, 'tt5', 'link6')" onMouseOut="HideTip('tt5')">connectionsAvailable</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
                    
15
                    
39
                    
40<div id=Menu><div class=MEntry><div class=MFile><a href="../../main-pl.html">main.pl</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Pms</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MFile><a href="../Application-pm.html">Application</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Core</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="Channel-pm.html">Channel</a></div></div><div class=MEntry><div class=MFile><a href="Connection-pm.html">Connection</a></div></div><div class=MEntry><div class=MFile id=MSelected>ConnectionProvider</div></div><div class=MEntry><div class=MFile><a href="Object-pm.html">Object</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Event</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../Event/Channel-pm.html">Channel</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Command-pm.html">Command</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Connect-pm.html">Connect</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Disconnect-pm.html">Disconnect</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Event-pm.html">Event</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Join-pm.html">Join</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Leave-pm.html">Leave</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Message-pm.html">Message</a></div></div><div class=MEntry><div class=MFile><a href="../Event/NickChange-pm.html">NickChange</a></div></div><div class=MEntry><div class=MFile><a href="../Event/Topic-pm.html">Topic</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Modules</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../Modules/Backlog-pm.html">Backlog</a></div></div><div class=MEntry><div class=MFile><a href="../Modules/Motd-pm.html">Motd</a></div></div><div class=MEntry><div class=MFile><a href="../Modules/Security/Module-pm.html">Security::<wbr>Module</a></div></div><div class=MEntry><div class=MFile><a href="../Modules/Security/UserInfo-pm.html">Security::<wbr>UserInfo</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Net</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../Net/WebSocket/Backend-pm.html">Backend</a></div></div><div class=MEntry><div class=MFile><a href="../Net/WebSocket/Connection-pm.html">Connection</a></div></div><div class=MEntry><div class=MFile><a href="../Net/WebSocket/ConnectionProvider-pm.html">ConnectionProvider</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Prot</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../Prot/Messages-pm.html">Messages</a></div></div><div class=MEntry><div class=MFile><a href="../Prot/Netstring-pm.html">Netstring</a></div></div><div class=MEntry><div class=MFile><a href="../Prot/Parser-pm.html">Parser</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../../PmsConfig-pm.html">PmsConfig</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent7')">Index</a><div class=MGroupContent id=MGroupContent7><div class=MEntry><div class=MIndex><a href="../../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Variables.html">Variables</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Signals.html">Signals</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Files.html">Files</a></div></div></div></div></div><script type="text/javascript"><!--
                    
41var searchPanel = new SearchPanel("searchPanel", "HTML", "../../../search");
                    
                
nscachedcli.c https://gitlab.com/kidaa/crossbridge.git | C | 576 lines
                    
32#include <sys/types.h>
                    
33#include <sys/socket.h>
                    
34#include <sys/event.h>
                    
53 * safe_write writes data to the specified connection and tries to do it in
                    
54 * the very safe manner. We ensure, that we can write to the socket with
                    
55 * kevent. If the data_size can't be sent in one piece, then it would be
                    
158	cmsg.hdr.cmsg_len =  CMSG_LEN(sizeof(struct cmsgcred));
                    
159	cmsg.hdr.cmsg_level = SOL_SOCKET;
                    
160	cmsg.hdr.cmsg_type = SCM_CREDS;
                    
196	struct sockaddr_un client_address;
                    
197	int client_address_len, client_socket;
                    
198	int res;
                    
201
                    
202	client_socket = _socket(PF_LOCAL, SOCK_STREAM, 0);
                    
203	client_address.sun_family = PF_LOCAL;
                    
                
LogicalAddress.java https://gitlab.com/kidaa/incubator-geode.git | Java | 370 lines
                    
14import java.net.InetAddress;
                    
15import java.net.SocketAddress;
                    
16import java.util.ArrayList;
                    
66     */
                    
67    transient SocketAddress primary_physical_addr=null;
                    
68
                    
68
                    
69    /** List<SocketAddress> of physical addresses */
                    
70    protected ArrayList physical_addrs=null;
                    
125
                    
126    public SocketAddress getPrimaryPhysicalAddress() {
                    
127        return primary_physical_addr;
                    
129
                    
130    public void setPrimaryPhysicalAddress(SocketAddress primary_physical_addr) {
                    
131        this.primary_physical_addr=primary_physical_addr;
                    
                
shell-server.js https://gitlab.com/Cebo/projekt-um.git | JavaScript | 290 lines
                    
25    // disabled, so that any connected shell clients will fail to
                    
26    // reconnect after the server process closes their sockets.
                    
27    fs.writeFileSync(
                    
44
                    
45  self.server = net.createServer(function(socket) {
                    
46    self.onConnection(socket);
                    
70
                    
71Sp.onConnection = function onConnection(socket) {
                    
72  var self = this;
                    
74
                    
75  // Make sure this function doesn't try to write anything to the socket
                    
76  // after it has been closed.
                    
76  // after it has been closed.
                    
77  socket.on("close", function() {
                    
78    socket = null;
                    
                
objects.lua https://gitlab.com/kidaa/Core3-CU.git | Lua | 219 lines
                    
86	snapToTerrain = 1,
                    
87	socketDestinations = {},
                    
88	structureFootprintFileName = "",
                    
145	snapToTerrain = 1,
                    
146	socketDestinations = {},
                    
147	structureFootprintFileName = "",
                    
204	snapToTerrain = 1,
                    
205	socketDestinations = {},
                    
206	structureFootprintFileName = "",
                    
                
wordpress.rb https://gitlab.com/jbwhips883/jekyll-import.git | Ruby | 362 lines
                    
16        c.option 'dbname', '--dbname DB', 'Database name (default: "")'
                    
17        c.option 'socket', '--socket SOCKET', 'Database socket (default: "")'
                    
18        c.option 'user', '--user USER', 'Database user name (default: "")'
                    
36      # host::    The address of the MySQL database host. Default: 'localhost'
                    
37      # socket::  The database socket's path
                    
38      # options:: A hash table of configuration options.
                    
74          :host           => opts.fetch('host', 'localhost'),
                    
75          :socket         => opts.fetch('socket', nil),
                    
76          :dbname         => opts.fetch('dbname', ''),
                    
100        db = Sequel.mysql2(options[:dbname], :user => options[:user], :password => options[:pass],
                    
101                          :socket => options[:socket], :host => options[:host], :encoding => 'utf8')
                    
102
                    
                
kuka_tcp_client.cpp https://gitlab.com/caro-sdu/caros.git | C++ | 156 lines
                    
6    : io_service_(io_service),
                    
7      socket_(io_service),
                    
8      body_length_(0),
                    
48    running_ = false;
                    
49    socket_.close();
                    
50  }
                    
55{
                    
56  boost::asio::async_connect(socket_, endpoint_iterator,
                    
57                             [this](boost::system::error_code err, boost::asio::ip::tcp::resolver::iterator)
                    
66                               }
                    
67                               std::cout << "[SOCKET CLIENT] connected to server" << std::endl;
                    
68                             }
                    
73{
                    
74  boost::asio::async_read(socket_, boost::asio::buffer(msg_len, tcp_client::header_length + 1),
                    
75                          [this](boost::system::error_code ec, std::size_t /*length*/)
                    
                
Server.cc https://gitlab.com/br0k3n_/SockWebServer.git | C++ | 278 lines
                    
12
                    
13    listenSocket = socket(AF_INET, SOCK_STREAM, 0);
                    
14
                    
47    {
                    
48        s->clientSocket = accept(s->listenSocket, NULL, NULL);
                    
49
                    
51        {
                    
52            close(s->listenSocket);
                    
53            close(s->clientSocket);
                    
63
                    
64void* ConnectionThread(void* socketptr)
                    
65{
                    
65{
                    
66    int socket = *(int*)socketptr;
                    
67
                    
                
proc.c https://gitlab.com/cedric-vincent/proot.git | C | 195 lines
                    
137		/* Don't dereference "/proc/<PID>/fd/???" now: they
                    
138		 * can point to anonymous pipe, socket, ...  otherwise
                    
139		 * they point to a path already canonicalized by the
                    
                
viewer.htm https://gitlab.com/BGCX261/zlatnaspirala2-svn-to-git.git | HTML | 165 lines
                    
8		//	****************************************************************************
                    
9		//	jWebSocket RPC Demo (uses jWebSocket Client and Server)
                    
10		//	Copyright (c) 2010 Alexander Schulze, Innotrade GmbH, Herzogenrath
                    
27		<link rel="stylesheet" type="text/css" href="../../res/css/jwebsocket.css">
                    
28		<!-- load the jWebSocket JavaScript client library -->
                    
29		<script src="../../res/js/jWebSocket.js" type="text/javascript"></script>
                    
63					OnOpen: function( aEvent ) {
                    
64						log( "<font style='color:#888'>jWebSocket connection established.</font>" );
                    
65						jws.$("simgStatus").src = "../../images/connected.png";
                    
74					OnMessage: function( aEvent ) {
                    
75						log( "<font style='color:#888'>jWebSocket message received: '" + aEvent.data + "'</font>" );
                    
76						jws.$("simgStatus").src = "../../images/authenticated.png";
                    
151				<td class="tdHeader" width="">
                    
152					jWebSocket Slideshow Viewer: &quot;Boosting Web Communication with WebSockets&quot;
                    
153					&nbsp;<span id="slblCount">-</span> online
                    
                
init.js https://gitlab.com/BGCX261/zlatnaspirala2-svn-to-git.git | JavaScript | 462 lines
                    
42                
                    
43				var lURL = "ws://" + SERVER[0].address + ":8787/jWebSocket/jWebSocket";
                    
44				//var lURL = "ws://188.226.129.11:8787/jWebSocket/jWebSocket";
                    
46				console.log("IP >>>>" + lURL);
                    
47				//var lURL = "ws://192.168.1.10:8787/jWebSocket/jWebSocket";
                    
48				
                    
54						OnOpen: function( aEvent ) {
                    
55							log( "jWebSocket connection established." );
                    
56							jws.$("simgStatus").src = "images/yes.png";
                    
68						OnMessage: function( aEvent ,aToken ) {
                    
69						//	log( "<font style='color:#888'>jWebSocket message received: '" + aEvent.data + "'</font>" );
                    
70							//////////////////////////////////////////////
                    
239						OnClose: function( aEvent ) {
                    
240							log( "<font style='color:#888'>jWebSocket connection closed.</font>" );
                    
241							jws.$("simgStatus").src = "images/disconnected.png";
                    
                
pageant.rb https://gitlab.com/slice-group/creators.git | Ruby | 373 lines
                    
13
                    
14  # This module encapsulates the implementation of a socket factory that
                    
15  # uses the PuTTY "pageant" utility to obtain information about SSH
                    
265
                    
266    # This is the pseudo-socket implementation that mimics the interface of
                    
267    # a socket, translating each request into a Windows messaging call to
                    
268    # the pageant daemon. This allows pageant support to be implemented
                    
269    # simply by replacing the socket factory used by the Agent class.
                    
270    class Socket
                    
273
                    
274      # The factory method for creating a new Socket instance. The location
                    
275      # parameter is ignored, and is only needed for compatibility with
                    
275      # parameter is ignored, and is only needed for compatibility with
                    
276      # the general Socket interface.
                    
277      def self.open(location=nil)
                    
                
host_echo.c https://gitlab.com/metadevfoundation/ecos-ax-som-bf609.git | C | 278 lines
                    
40#include <sys/param.h>
                    
41#include <sys/socket.h>
                    
42#include <sys/ioctl.h>
                    
144
                    
145    s_source = socket(AF_INET, SOCK_STREAM, 0);
                    
146    if (s_source < 0) {
                    
146    if (s_source < 0) {
                    
147        pexit("stream socket");
                    
148    }
                    
148    }
                    
149    if (setsockopt(s_source, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) {
                    
150        pexit("setsockopt /source/ SO_REUSEADDR");
                    
161
                    
162    s_sink = socket(AF_INET, SOCK_STREAM, 0);
                    
163    if (s_sink < 0) {
                    
                
jwsChannelPlugIn.js https://gitlab.com/BGCX261/zlatnaspirala2-svn-to-git.git | JavaScript | 366 lines
                    
1//	---------------------------------------------------------------------------
                    
2//	jWebSocket Channel PlugIn (uses jWebSocket Client and Server)
                    
3//	(C) 2010 jWebSocket.org, Alexander Schulze, Innotrade GmbH, Herzogenrath
                    
18//	---------------------------------------------------------------------------
                    
19//  jWebSocket Channel Plug-In
                    
20//	---------------------------------------------------------------------------
                    
29
                    
30	//:const:*:NS:String:org.jwebsocket.plugins.channels (jws.NS_BASE + ".plugins.channels")
                    
31	//:d:en:Namespace for the [tt]ChannelPlugIn[/tt] class.
                    
364
                    
365// add the ChannelPlugIn PlugIn into the jWebSocketTokenClient class
                    
366jws.oop.addPlugIn( jws.jWebSocketTokenClient, jws.ChannelPlugIn );
                    
                
tcp-passive.c https://gitlab.com/libnice/libnice.git | C | 341 lines
                    
71    const NiceOutputMessage *messages, guint n_messages);
                    
72static gint socket_send_messages_reliable (NiceSocket *sock,
                    
73    const NiceAddress *to, const NiceOutputMessage *messages, guint n_messages);
                    
75static gboolean socket_can_send (NiceSocket *sock, NiceAddress *addr);
                    
76static void socket_set_writable_callback (NiceSocket *sock,
                    
77    NiceSocketWritableCb callback, gpointer user_data);
                    
101  if (name.storage.ss_family == AF_UNSPEC || name.storage.ss_family == AF_INET) {
                    
102    gsock = g_socket_new (G_SOCKET_FAMILY_IPV4, G_SOCKET_TYPE_STREAM,
                    
103        G_SOCKET_PROTOCOL_TCP, NULL);
                    
109  } else if (name.storage.ss_family == AF_INET6) {
                    
110    gsock = g_socket_new (G_SOCKET_FAMILY_IPV6, G_SOCKET_TYPE_STREAM,
                    
111        G_SOCKET_PROTOCOL_TCP, NULL);
                    
209  if (to) {
                    
210    NiceSocket *peer_socket = g_hash_table_lookup (priv->connections, to);
                    
211    if (peer_socket)
                    
                
6.x-or-7.x-to-7.10.md https://gitlab.com/cirosantilli/gitlab-ee.git | Markdown | 300 lines
                    
100
                    
101## 5. Configure Redis to use sockets
                    
102
                    
102
                    
103    # Configure redis to use sockets
                    
104    sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig
                    
106    sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf
                    
107    # Enable Redis socket for default Debian / Ubuntu path
                    
108    echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf
                    
109    # Be sure redis group can write to the socket, enable only if supported (>= redis 2.4.0).
                    
110    sudo sed -i '/# unixsocketperm/ s/^# unixsocketperm.*/unixsocketperm 0775/' /etc/redis/redis.conf
                    
111    # Activate the changes to redis.conf
                    
121    # Configure gitlab-shell to use Redis sockets
                    
122    sudo -u git -H sed -i 's|^  # socket.*|  socket: /var/run/redis/redis.sock|' /home/git/gitlab-shell/config.yml
                    
123
                    
                
nvmem.c https://gitlab.com/caesar-lab/micropython.git | C | 334 lines
                    
45#include "hci.h"
                    
46#include "socket.h"
                    
47#include "evnt_handler.h"
                    
                
util.h https://gitlab.com/X9180/android_kernel_zte_x9180.git | C Header | 268 lines
                    
69#include <sys/poll.h>
                    
70#include <sys/socket.h>
                    
71#include <sys/ioctl.h>
                    
                
socket.P https://gitlab.com/kidaa/HDTheatre.git | Prolog | 154 lines
                    
1 \
                    
2 out/target/product/g945/obj/STATIC_LIBRARIES/libasound_intermediates/src/socket.o:  \
                    
3 external/alsa-lib/src/socket.c \
                    
26  bionic/libc/kernel/common/linux/capability.h \
                    
27  bionic/libc/include/pathconf.h bionic/libc/include/sys/socket.h \
                    
28  bionic/libc/kernel/common/linux/socket.h \
                    
28  bionic/libc/kernel/common/linux/socket.h \
                    
29  bionic/libc/kernel/arch-x86/asm/socket.h \
                    
30  bionic/libc/kernel/arch-x86/asm/sockios.h \
                    
78  external/alsa-lib/include/list.h
                    
79 external/alsa-lib/src/socket.c :
                    
80  system/core/include/arch/target_linux-x86/AndroidConfig.h :
                    
102  bionic/libc/kernel/common/linux/capability.h :
                    
103  bionic/libc/include/pathconf.h bionic/libc/include/sys/socket.h :
                    
104  bionic/libc/kernel/common/linux/socket.h :
                    
                
server.cpp https://gitlab.com/Baggins800/VCCMS.git | C++ | 167 lines
                    
3#include <QtNetwork/QTcpServer>
                    
4#include <QtNetwork/QTcpSocket>
                    
5#include <QDebug>
                    
8    blocksize = 0;
                    
9    m_clientconnection = new QList<TcpSocket*>();
                    
10    bool connected = ConnectDB("localhost","vccms","root","ascent");
                    
103{
                    
104    m_clientconnection->append(new TcpSocket(m_tcpserver->nextPendingConnection()));
                    
105    qDebug()<<m_clientconnection->value(m_clientconnection->count()-1)->Address()<<" connected";
                    
105    qDebug()<<m_clientconnection->value(m_clientconnection->count()-1)->Address()<<" connected";
                    
106    connect(m_clientconnection->value(m_clientconnection->count()-1), SIGNAL(dataReady(TcpSocket*)), this, SLOT(read(TcpSocket*)));
                    
107    connect(m_clientconnection->value(m_clientconnection->count()-1), SIGNAL(disconnected(TcpSocket*)),m_clientconnection->value(m_clientconnection->count()-1), SLOT(deleteLater()));
                    
107    connect(m_clientconnection->value(m_clientconnection->count()-1), SIGNAL(disconnected(TcpSocket*)),m_clientconnection->value(m_clientconnection->count()-1), SLOT(deleteLater()));
                    
108    connect(m_clientconnection->value(m_clientconnection->count()-1),SIGNAL(disconnected(TcpSocket*)),this,SLOT(disconnected(TcpSocket*)));
                    
109    m_clientconnection->value(m_clientconnection->count()-1)->write(QString("connection_accepted").toLocal8Bit());
                    
                
TcpServerTransport.cs https://gitlab.com/frank-pti/datacollector.git | C# | 195 lines
                    
89                dataSocket = listenSocket.EndAccept(result);
                    
90                SocketReceiveState receiveState = new SocketReceiveState(dataSocket, 1024);
                    
91                BeginReceive(receiveState);
                    
107        {
                    
108            SocketReceiveState receiveState = result.AsyncState as SocketReceiveState;
                    
109            int count = 0;
                    
146        {
                    
147            if (dataSocket == null || !dataSocket.Connected) {
                    
148                throw new InvalidOperationException("The socket you want to send data on is not connected");
                    
150            Logger.Log("sending: {0}", System.Text.Encoding.ASCII.GetString(data, offset, count));
                    
151            dataSocket.BeginSend(data, offset, count, SocketFlags.None, OnDataSent, null);
                    
152        }
                    
159                } catch (SocketException e) {
                    
160                    if (e.SocketErrorCode == SocketError.Shutdown) {
                    
161                        // silently ignore, this happens when the other end disconnects
                    
                
fnet_ip6.h https://gitlab.com/fuggles/ucos.git | C Header | 168 lines
                    
47
                    
48/*! @addtogroup fnet_socket */
                    
49/*! @{ */
                    
                
GameClient.java https://gitlab.com/hexx/hexx.git | Java | 345 lines
                    
3import java.io.IOException;
                    
4import java.net.InetSocketAddress;
                    
5import java.util.List;
                    
74   */
                    
75  public boolean connectToServer(final InetSocketAddress socketAddress,
                    
76      final int timeout) {
                    
79      this.kryoClient.start();
                    
80      this.kryoClient.connect(timeout, socketAddress.getAddress(),
                    
81          socketAddress.getPort());
                    
85      logger.error("Error connecting to the server {}, exception: {}",
                    
86          socketAddress.toString(), e.getMessage());
                    
87
                    
96    logger.debug("Successfully connected to server {}",
                    
97        socketAddress.toString());
                    
98
                    
                
GatheringByteChannel.html https://gitlab.com/PNNutkung/Java-API.git | HTML | 182 lines
                    
82<div class="block">Defines channels, which represent connections to entities that are capable of
                    
83 performing I/O operations, such as files and sockets; defines selectors, for
                    
84 multiplexed, non-blocking I/O operations.</div>
                    
105<td class="colLast"><code><strong><a href="../../../../java/nio/channels/DatagramChannel.html" title="class in java.nio.channels">DatagramChannel</a></strong></code>
                    
106<div class="block">A selectable channel for datagram-oriented sockets.</div>
                    
107</td>
                    
122<td class="colFirst"><code>class&nbsp;</code></td>
                    
123<td class="colLast"><code><strong><a href="../../../../java/nio/channels/SocketChannel.html" title="class in java.nio.channels">SocketChannel</a></strong></code>
                    
124<div class="block">A selectable channel for stream-oriented connecting sockets.</div>
                    
                
objects.lua https://gitlab.com/kidaa/Core3-CU.git | Lua | 160 lines
                    
86	snapToTerrain = 1,
                    
87	socketDestinations = {},
                    
88	structureFootprintFileName = "",
                    
145	snapToTerrain = 1,
                    
146	socketDestinations = {},
                    
147	structureFootprintFileName = "",
                    
                
virnetdaemontest.c https://gitlab.com/libvirt/libvirt.git | C | 427 lines
                    
89    virNetServerClientPtr cln1 = NULL, cln2 = NULL;
                    
90    virNetSocketPtr sk1 = NULL, sk2 = NULL;
                    
91    int fdclient[2];
                    
92
                    
93    if (socketpair(PF_UNIX, SOCK_STREAM, 0, fdclient) < 0) {
                    
94        virReportSystemError(errno, "%s",
                    
94        virReportSystemError(errno, "%s",
                    
95                             "Cannot create socket pair");
                    
96        goto cleanup;
                    
132
                    
133    if (virNetSocketNewConnectSockFD(fdclient[0], &sk1) < 0)
                    
134        goto error;
                    
134        goto error;
                    
135    if (virNetSocketNewConnectSockFD(fdclient[1], &sk2) < 0)
                    
136        goto error;
                    
                
accept.html https://gitlab.com/boostdoc-qch/doc.git | HTML | 82 lines
                    
26<div class="titlepage"><div><div><h4 class="title">
                    
27<a name="boost_asio.reference.basic_socket_acceptor.accept"></a><a class="link" href="accept.html" title="basic_socket_acceptor::accept">basic_socket_acceptor::accept</a>
                    
28</h4></div></div></div>
                    
34    <span class="keyword">typename</span> <a class="link" href="../Protocol.html" title="Protocol requirements">Protocol1</a><span class="special">,</span>
                    
35    <span class="keyword">typename</span> <a class="link" href="../SocketService.html" title="Socket service requirements">SocketService</a><span class="special">&gt;</span>
                    
36<span class="keyword">void</span> <a class="link" href="accept/overload1.html" title="basic_socket_acceptor::accept (1 of 4 overloads)">accept</a><span class="special">(</span>
                    
42    <span class="keyword">typename</span> <a class="link" href="../Protocol.html" title="Protocol requirements">Protocol1</a><span class="special">,</span>
                    
43    <span class="keyword">typename</span> <a class="link" href="../SocketService.html" title="Socket service requirements">SocketService</a><span class="special">&gt;</span>
                    
44<span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <a class="link" href="accept/overload2.html" title="basic_socket_acceptor::accept (2 of 4 overloads)">accept</a><span class="special">(</span>
                    
53<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
                    
54    <span class="keyword">typename</span> <a class="link" href="../SocketService.html" title="Socket service requirements">SocketService</a><span class="special">&gt;</span>
                    
55<span class="keyword">void</span> <a class="link" href="accept/overload3.html" title="basic_socket_acceptor::accept (3 of 4 overloads)">accept</a><span class="special">(</span>
                    
60<span class="keyword">template</span><span class="special">&lt;</span>
                    
61    <span class="keyword">typename</span> <a class="link" href="../SocketService.html" title="Socket service requirements">SocketService</a><span class="special">&gt;</span>
                    
62<span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span> <a class="link" href="accept/overload4.html" title="basic_socket_acceptor::accept (4 of 4 overloads)">accept</a><span class="special">(</span>
                    
                
ZmqSocketTest.as https://gitlab.com/BGCX261/zmqsocket-as-svn-to-git.git | ActionScript | 394 lines
                    
13
                    
14	public class ZmqSocket extends EventDispatcher 
                    
15	{
                    
17		//  Encapsulated tcp socket.
                    
18		private var socket: Socket = null;
                    
19		//  Identity of socket, null if anonymous.
                    
58
                    
59			socket = new Socket;
                    
60
                    
62			socket.addEventListener (Event.CONNECT, connectHandler);
                    
63			socket.addEventListener (ProgressEvent.SOCKET_DATA, socketDataHandler);
                    
64
                    
154				dispatchEvent (new IOErrorEvent (IOErrorEvent.IO_ERROR, false, false, 
                    
155												 "Socket is not connected yet"));
                    
156				return false;
                    
                
 

Source

Language