PageRenderTime 991ms queryFilters 1ms Sphinxql 282ms GetByIds 452ms meta 0ms repositoryFilters 154ms languageFilters 4ms sourceFilters 0ms

4,451 results for 'socket' (991 ms)

Source

Language

Repository

GCDAsyncUdpSocket.html https://gitlab.com/mba811/tokaidoapp.git | HTML | 3,584 lines
96	
97	<option value="//api/name/initWithDelegate:delegateQueue:socketQueue:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithDelegate:delegateQueue:socketQueue:</option>
98	
98	
99	<option value="//api/name/initWithSocketQueue:">&nbsp;&nbsp;&nbsp;&nbsp;- initWithSocketQueue:</option>
100	
968	<span class="tooltip">
969		<code><a href="#//api/name/socketFD">&ndash;&nbsp;socketFD</a></code>
970		<span class="tooltip"><p>These methods are only available from within the context of a <a href="#//api/name/performBlock:">performBlock:</a> invocation.<br/>
1822<p>The socket queue is optional.<br/>
1823If you pass NULL, <a href="../Classes/GCDAsyncSocket.html">GCDAsyncSocket</a> will automatically create its own socket queue.<br/>
1824If you choose to provide a socket queue, the socket queue must not be a concurrent queue.</p>
3326						<div class="section-method">
3327	<a name="//api/name/socket6FD" title="socket6FD"></a>
3328	<h3 class="subsubtitle method-title">socket6FD</h3>
GCDAsyncSocketDelegate.html https://gitlab.com/mba811/tokaidoapp.git | HTML | 949 lines
43	
44	<option value="//api/name/newSocketQueueForConnectionFromAddress:onSocket:">&nbsp;&nbsp;&nbsp;&nbsp;- newSocketQueueForConnectionFromAddress:onSocket:</option>
45	
45	
46	<option value="//api/name/socket:didAcceptNewSocket:">&nbsp;&nbsp;&nbsp;&nbsp;- socket:didAcceptNewSocket:</option>
47	
282	<div class="method-subsection brief-description">
283		<p>This method is called immediately prior to <a href="#//api/name/socket:didAcceptNewSocket:">socket:didAcceptNewSocket:</a>.<br/>
284It optionally allows a listening socket to specify the socketQueue for a new accepted socket.<br/>
334						<div class="section-method">
335	<a name="//api/name/socket:didAcceptNewSocket:" title="socket:didAcceptNewSocket:"></a>
336	<h3 class="subsubtitle method-title">socket:didAcceptNewSocket:</h3>
346
347	<div class="method-subsection method-declaration"><code>- (void)socket:(GCDAsyncSocket *)<em>sock</em> didAcceptNewSocket:(GCDAsyncSocket *)<em>newSocket</em></code></div>
348
AsyncSocketDelegate.html https://gitlab.com/mba811/tokaidoapp.git | HTML | 998 lines
43	
44	<option value="//api/name/onSocket:didAcceptNewSocket:">&nbsp;&nbsp;&nbsp;&nbsp;- onSocket:didAcceptNewSocket:</option>
45	
183	<span class="tooltip">
184		<code><a href="#//api/name/onSocket:didAcceptNewSocket:">&ndash;&nbsp;onSocket:didAcceptNewSocket:</a></code>
185		<span class="tooltip"><p>Called when a socket accepts a connection.  Another socket is spawned to handle it. The new socket will have<br/>
191	<span class="tooltip">
192		<code><a href="#//api/name/onSocket:wantsRunLoopForNewSocket:">&ndash;&nbsp;onSocket:wantsRunLoopForNewSocket:</a></code>
193		<span class="tooltip"><p>Called when a new socket is spawned to handle a connection.  This method should return the run-loop of the<br/>
303
304	<div class="method-subsection method-declaration"><code>- (void)onSocket:(AsyncSocket *)<em>sock</em> didAcceptNewSocket:(AsyncSocket *)<em>newSocket</em></code></div>
305
665
666	<div class="method-subsection method-declaration"><code>- (NSRunLoop *)onSocket:(AsyncSocket *)<em>sock</em> wantsRunLoopForNewSocket:(AsyncSocket *)<em>newSocket</em></code></div>
667
PROXY.C https://gitlab.com/mba811/TortoiseGit.git | C | 1,517 lines
111{
112    Proxy_Socket ps = (Proxy_Socket) s;
113
266    Proxy_Plug pp = (Proxy_Plug) p;
267    Proxy_Socket ps = pp->proxy_socket;
268
392{
393    static const struct socket_function_table socket_fn_table = {
394	sk_proxy_plug,
464	/* create the proxy plug to map calls from the actual
465	 * socket into our proxy socket layer */
466	pplug = snew(struct Plug_proxy_tag);
488				 nodelay, keepalive, (Plug) pplug);
489	if (sk_socket_error(ret->sub_socket) != NULL)
490	    return (Socket) ret;
WebSocket.java https://gitlab.com/math4youbyusgroupillinois/websocket.git | Java | 290 lines
21import com.pmeade.websocket.io.WebSocketServerInputStream;
22import com.pmeade.websocket.io.WebSocketServerOutputStream;
23import java.io.IOException;
30/**
31 * WebSocket decorates Socket to provide the server side of a Socket that
32 * speaks the WebSocket (RFC 6455) protocol.
36    /**
37     * Construct a WebSocket. WebSocket decorates a Socket for WebSocket
38     * (RFC 6455) behavior.
81    @Override
82    public final SocketAddress getRemoteSocketAddress() {
83        return socket.getRemoteSocketAddress();
273    /**
274     * Socket to be decorated for WebSocket behavior.
275     */
net.cpp https://gitlab.com/m0gliE/litecoin.git | C++ | 2,075 lines
61
62        ListenSocket(SOCKET socket, bool whitelisted) : socket(socket), whitelisted(whitelisted) {}
63    };
773            FD_SET(hListenSocket.socket, &fdsetRecv);
774            hSocketMax = max(hSocketMax, hListenSocket.socket);
775            have_fds = true;
842        {
843            if (hListenSocket.socket != INVALID_SOCKET && FD_ISSET(hListenSocket.socket, &fdsetRecv))
844            {
846                socklen_t len = sizeof(sockaddr);
847                SOCKET hSocket = accept(hListenSocket.socket, (struct sockaddr*)&sockaddr, &len);
848                CAddress addr;
1694            if (hListenSocket.socket != INVALID_SOCKET)
1695                if (!CloseSocket(hListenSocket.socket))
1696                    LogPrintf("CloseSocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
net.cpp https://gitlab.com/m0gliE/fastcoin-cli.git | C++ | 2,075 lines
61
62        ListenSocket(SOCKET socket, bool whitelisted) : socket(socket), whitelisted(whitelisted) {}
63    };
773            FD_SET(hListenSocket.socket, &fdsetRecv);
774            hSocketMax = max(hSocketMax, hListenSocket.socket);
775            have_fds = true;
842        {
843            if (hListenSocket.socket != INVALID_SOCKET && FD_ISSET(hListenSocket.socket, &fdsetRecv))
844            {
846                socklen_t len = sizeof(sockaddr);
847                SOCKET hSocket = accept(hListenSocket.socket, (struct sockaddr*)&sockaddr, &len);
848                CAddress addr;
1694            if (hListenSocket.socket != INVALID_SOCKET)
1695                if (!CloseSocket(hListenSocket.socket))
1696                    LogPrintf("CloseSocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
rss.cpp https://gitlab.com/libvirt/autotest.git | C++ | 1,011 lines
244    // Create socket
245    SOCKET ListenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
246    if (ListenSocket == INVALID_SOCKET)
276    // Accept the connection
277    SOCKET socket = accept(ListenSocket, (sockaddr *)&addr, &addrlen);
278    if (socket == INVALID_SOCKET) {
311// Send a given number of bytes from a buffer
312BOOL Send(SOCKET socket, const char *buffer, int len)
313{
505
506    SOCKET ListenSocket = PrepareListenSocket(shell_port);
507
873{
874    SOCKET ListenSocket = PrepareListenSocket(file_transfer_port);
875
uipc_syscalls.cc https://gitlab.com/jforge/osv.git | C++ | 1,105 lines
47#include <osv/file.h>
48#include <osv/socket.hh>
49
51#include <bsd/sys/sys/protosw.h>
52#include <bsd/sys/sys/socket.h>
53#include <bsd/sys/sys/socketvar.h>
104
105    if (file_type(fp) != DTYPE_SOCKET) {
106        fdrop(fp);
114
115socketref socreate(int dom, int type, int proto)
116{
116{
117	socket* so;
118	int error = socreate(dom, &so, type, proto, nullptr, nullptr);
sockbuf.h https://gitlab.com/jforge/osv.git | C++ Header | 239 lines
28 *
29 *	@(#)socketvar.h	8.3 (Berkeley) 2/19/95
30 *
58#define	SB_IN_TOE	0x400		/* socket buffer is in the middle of an operation */
59#define	SB_AUTOSIZE	0x800		/* automatically size socket buffer */
60
66struct bsd_sockaddr;
67struct socket;
68struct thread;
94/*
95 * Variables for socket buffering.
96 */
124/*
125 * Per-socket buffer mutex used to protect most fields in the socket
126 * buffer.
protosw.h https://gitlab.com/jforge/osv.git | C++ Header | 347 lines
42struct bsd_sockaddr;
43struct socket;
44struct sockopt;
81struct protosw {
82	short	pr_type;		/* socket type used for */
83	struct	domain *pr_domain;	/* domain protocol a member of */
136#define	PRU_DETACH		1	/* detach protocol from up */
137#define	PRU_BIND		2	/* bind socket to address */
138#define	PRU_LISTEN		3	/* listen for connection */
198		    struct thread *td);
199	int	(*pru_connect2)(struct socket *so1, struct socket *so2);
200	int	(*pru_control)(struct socket *so, u_long cmd, caddr_t data,
240	    struct thread *td);
241int	pru_connect2_notsupp(struct socket *so1, struct socket *so2);
242int	pru_control_notsupp(struct socket *so, u_long cmd, caddr_t data,
tcp_usrreq.cc https://gitlab.com/jforge/osv.git | C++ | 2,032 lines
51#endif /* INET6 */
52#include <bsd/sys/sys/socket.h>
53#include <bsd/sys/sys/socketvar.h>
172	KASSERT(so->so_pcb == inp, ("tcp_detach: so_pcb != inp"));
173	KASSERT(inp->inp_socket == so, ("tcp_detach: inp_socket != so"));
174
1067	struct inpcb *inp = tp->t_inpcb, *oinp;
1068	struct socket *so = inp->inp_socket;
1069	struct in_addr laddr;
1129	struct inpcb *inp = tp->t_inpcb, *oinp;
1130	struct socket *so = inp->inp_socket;
1131	struct bsd_sockaddr_in6 *sin6 = (struct bsd_sockaddr_in6 *)nam;
1635	struct inpcb *inp = tp->t_inpcb;
1636	struct socket *so = inp->inp_socket;
1637
ivy.py https://gitlab.com/ivybus/ivy-python.git | Python | 1,547 lines
149
150    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
151    on = 1
151    on = 1
152    s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, on)
153    if hasattr(socket, 'SO_REUSEPORT'):
154        s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, on)
155    s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, on)
156
220
221        new_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
222        new_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, on)
689        socket `self.socket`.  This method catches all exceptions
690        `socket.error` and `socket.timeout` and ignores them, simply logging
691        them at the "info" level.
SocketConnection.java https://gitlab.com/javajamesb08/Openfire.git | Java | 699 lines
132     * @param backupDeliverer the packet deliverer this connection will use when socket is closed.
133     * @param socket the socket to represent.
134     * @param isSecure true if this is a secure connection.
136     */
137    public SocketConnection(PacketDeliverer backupDeliverer, Socket socket, boolean isSecure)
138            throws IOException {
547     * a long time. This method should only be called from {@link SocketSendingTracker} when
548     * sending data over the socket has taken a long time and we need to close the socket, discard
549     * the connection and its session.
692	public String toString() {
693        return super.toString() + " socket: " + socket + " session: " + session;
694    }
695
696    public void setSocketReader(SocketReader socketReader) {
697        this.socketReader = socketReader;
test.lisp https://gitlab.com/ivargasc/ecl.git | Lisp | 256 lines
3
4;; This file is based on SBCL's SB-BSD-SOCKET module and has been
5;; heavily modified to work with ECL by Julian Stecklina.
5;; heavily modified to work with ECL by Julian Stecklina.
6;; Port to Windows Sockets contributed by M. Goffioul.
7
9
10;; Trivial stuff is copied from SBCL's SB-BSD-SOCKETS, which is also
11;; in the public domain.
14
15(load "sys:sockets")
16(load "../rt/rt")
17
18(use-package :sb-bsd-sockets)
19(use-package :sb-rt)
RtpRelay.java https://gitlab.com/javajamesb08/Openfire.git | Java | 907 lines
365					transmitters.put(key, st);
366					Log.debug("[[" + cs.internalCallId + "]] RtpRelay::StunTransmitter scheduled (fast) [" + jabberSocket.socket().getLocalPort() + "][" + sipSocket.socket().getLocalPort() + "] ==> " + st.socket.socket().getLocalPort());
367					retransTimer.schedule(st, 50, 50);
387
388		Log.info("[[" + cs.internalCallId + "]] RtpRelay created [" + jabberSocket.socket().getLocalPort() + "][" + sipSocket.socket().getLocalPort() + "]");
389
398	{
399		Log.info("[[" + cs.internalCallId + "]] RtpRelay destroyed [" + jabberSocket.socket().getLocalPort() + "][" + sipSocket.socket().getLocalPort() + "]");
400		super.finalize(); // not necessary if extending Object.
470						Log.info("Remote = " + remote + " me = " + me);
471						sendBind(remote, me, ((InetSocketAddress) src).getAddress().getHostAddress(), ((InetSocketAddress) src).getPort(), socket == jabberSocket ? false : true);
472
524							transmitters.put(newKey, newTimer);
525							Log.debug("[[" + cs.internalCallId + "]] RtpRelay::StunTransmitter scheduled (slow) [" + jabberSocket.socket().getLocalPort() + "][" + sipSocket.socket().getLocalPort() + "] ==> " + newTimer.socket.socket().getLocalPort());
526							retransTimer.schedule(newTimer, 100, 5000);
AsyncSocket.h https://gitlab.com/intelij/tommyBros.git | C Header | 659 lines
21{
22	AsyncSocketCFSocketError = kCFSocketError,	// From CFSocketError enum.
23	AsyncSocketNoError = 0,						// Never used.
55**/
56- (void)onSocket:(AsyncSocket *)sock didAcceptNewSocket:(AsyncSocket *)newSocket;
57
61**/
62- (NSRunLoop *)onSocket:(AsyncSocket *)sock wantsRunLoopForNewSocket:(AsyncSocket *)newSocket;
63
71 * If the connectToAddress:error: method was called, the delegate will be able to access and configure the
72 * CFSocket and CFSocketNativeHandle (BSD socket) as desired prior to connection. You will be able to access and
73 * configure the CFReadStream and CFWriteStream in the onSocket:didConnectToHost:port: method.
612 * 
613 * If a new socket is accepted, the delegate method onSocket:wantsRunLoopForNewSocket: is called to
614 * allow you to place the socket on a separate thread. This works best in conjunction with a thread pool design.
PROXY.C https://gitlab.com/info29/tortoisegit.git | C | 1,510 lines
111{
112    Proxy_Socket ps = (Proxy_Socket) s;
113
255    Proxy_Plug pp = (Proxy_Plug) p;
256    Proxy_Socket ps = pp->proxy_socket;
257
382{
383    static const struct socket_function_table socket_fn_table = {
384	sk_proxy_plug,
453	/* create the proxy plug to map calls from the actual
454	 * socket into our proxy socket layer */
455	pplug = snew(struct Plug_proxy_tag);
477				 nodelay, keepalive, (Plug) pplug);
478	if (sk_socket_error(ret->sub_socket) != NULL)
479	    return (Socket) ret;
TiNetworkTCPSocketProxy.mm https://gitlab.com/intelij/Forging-Titanium.git | Objective C++ | 761 lines
35
36void handleSocketConnection(CFSocketRef socket, CFSocketCallBackType type,
37							CFDataRef address, const void* data, void* info);
130    
131    CFSocketSetSocketFlags(socket, CFSocketGetSocketFlags(socket) & ~kCFSocketCloseOnInvalidate);
132}
295    SocketStreams* streams = 
296        (SocketStreams*)[[remoteSocketDictionary objectForKey:[NSNumber numberWithInt:remoteSocket]] bytes];
297    
665
666void handleSocketConnection(CFSocketRef socket, CFSocketCallBackType type, 
667							CFDataRef address, const void* data, void* info) {
718		case kCFStreamEventEndEncountered: {
719            CFSocketNativeHandle remoteSocket = [hostSocket getHandleFromStream:(NSInputStream*)input];
720            if (remoteSocket != -1) {
AsyncUdpSocket.h https://gitlab.com/intelij/Forging-Titanium.git | C Header | 366 lines
20{
21	AsyncUdpSocketCFSocketError = kCFSocketError,	// From CFSocketError enum
22	AsyncUdpSocketNoError = 0,						// Never used
28};
29typedef enum AsyncUdpSocketError AsyncUdpSocketError;
30
33	CFSocketRef theSocket4;            // IPv4 socket
34	CFSocketRef theSocket6;            // IPv6 socket
35	
325**/
326- (void)onUdpSocket:(AsyncUdpSocket *)sock didSendDataWithTag:(long)tag;
327
357**/
358- (void)onUdpSocket:(AsyncUdpSocket *)sock didNotReceiveDataWithTag:(long)tag dueToError:(NSError *)error;
359
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21