PageRenderTime 60ms queryFilters 0ms Sphinxql 302ms GetByIds 365ms meta 0ms repositoryFilters 441ms languageFilters 0ms sourceFilters 0ms

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

Source

Language

Repository

AsyncUdpSocket.m https://gitlab.com/intelij/Forging-Titanium.git | Objective C | 2,343 lines
259		{
260			CFSocketSetSocketFlags(theSocket4, kCFSocketCloseOnInvalidate);
261		}
263		{
264			CFSocketSetSocketFlags(theSocket6, kCFSocketCloseOnInvalidate);
265		}
812	int reuseOn = 1;
813	if (theSocket4)	setsockopt(CFSocketGetNative(theSocket4), SOL_SOCKET, SO_REUSEADDR, &reuseOn, sizeof(reuseOn));
814	if (theSocket6)	setsockopt(CFSocketGetNative(theSocket6), SOL_SOCKET, SO_REUSEADDR, &reuseOn, sizeof(reuseOn));
1920			// Request notification when the socket is ready to send more data
1921			CFSocketEnableCallBacks(theSocket, kCFSocketReadCallBack | kCFSocketWriteCallBack);
1922		}
2233				// Request notification when the socket is ready to receive more data
2234				CFSocketEnableCallBacks(theSocket, kCFSocketReadCallBack | kCFSocketWriteCallBack);
2235			}
TiNetworkSocketTCPProxy.m https://gitlab.com/intelij/Forging-Titanium.git | Objective C | 834 lines
193    // Make sure that we 'accept' only when explicitly requested
194    CFSocketRef cfSocket = [socket getCFSocket];
195    CFOptionFlags options = CFSocketGetSocketFlags(cfSocket);
195    CFOptionFlags options = CFSocketGetSocketFlags(cfSocket);
196    CFSocketSetSocketFlags(cfSocket, options & ~kCFSocketAutomaticallyReenableAcceptCallBack);
197  
345    
346    CFSocketRef sock = [socket getCFSocket];
347    CFSocketEnableCallBacks(sock, kCFSocketAcceptCallBack);
654// Called 1st in the accept process
655- (void)onSocket:(AsyncSocket *)sock didAcceptNewSocket:(AsyncSocket *)newSocket
656{
662// Called 2nd in the accept process
663-(NSRunLoop*)onSocket:(AsyncSocket *)sock wantsRunLoopForNewSocket:(AsyncSocket *)newSocket
664{
l_net_wins.c https://gitlab.com/illwieckz/netradiant.git | C | 761 lines
301
302	if ( ioctlsocket( newsocket, FIONBIO, &_true ) == -1 ) {
303		WinPrint( "WINS_OpenSocket: %s\n", WINS_ErrorMessage( WSAGetLastError() ) );
413
414	if ( closesocket( socket ) == SOCKET_ERROR ) {
415		WinPrint( "WINS_CloseSocket: %s\n", WINS_ErrorMessage( WSAGetLastError() ) );
545//===========================================================================
546int WINS_MakeSocketBroadcastCapable( int socket ){
547	int i = 1;
565
566	if ( socket != net_broadcastsocket ) {
567		if ( net_broadcastsocket != 0 ) {
569		}
570		ret = WINS_MakeSocketBroadcastCapable( socket );
571		if ( ret == -1 ) {
l_net_berkley.c https://gitlab.com/illwieckz/netradiant.git | C | 748 lines
198	//++timo WTF is that net_controlsocket? it's sole purpose is to retrieve the local IP?
199	if ( ( net_controlsocket = WINS_OpenSocket( 0 ) ) == SOCKET_ERROR ) {
200		WinError( "WINS_Init: Unable to open control socket\n" );
274
275	if ( ( newsocket = socket( PF_INET, SOCK_DGRAM, IPPROTO_UDP ) ) == SOCKET_ERROR ) {
276		WinPrint( "WINS_OpenSocket: %s\n", WINS_ErrorMessage( WSAGetLastError() ) );
279
280	if ( ioctlsocket( newsocket, FIONBIO, &_true ) == SOCKET_ERROR ) {
281		WinPrint( "WINS_OpenSocket: %s\n", WINS_ErrorMessage( WSAGetLastError() ) );
391
392	if ( closesocket( socket ) == SOCKET_ERROR ) {
393		WinPrint( "WINS_CloseSocket: %s\n", WINS_ErrorMessage( WSAGetLastError() ) );
536	}
537	net_broadcastsocket = socket;
538
gsocketclient.c https://gitlab.com/ImageMagick/glib.git | C | 1,927 lines
397GSocketType
398g_socket_client_get_socket_type (GSocketClient *client)
399{
407 *
408 * Sets the socket type of the socket client.
409 * The sockets created by this object will be of the specified
417void
418g_socket_client_set_socket_type (GSocketClient *client,
419				 GSocketType    type)
1824GSocketConnection *
1825g_socket_client_connect_finish (GSocketClient  *client,
1826				GAsyncResult   *result,
1847GSocketConnection *
1848g_socket_client_connect_to_host_finish (GSocketClient  *client,
1849					GAsyncResult   *result,
gsocket.h https://gitlab.com/ImageMagick/glib.git | C Header | 305 lines
88GLIB_AVAILABLE_IN_ALL
89GSocketType            g_socket_get_socket_type         (GSocket                 *socket);
90GLIB_AVAILABLE_IN_ALL
90GLIB_AVAILABLE_IN_ALL
91GSocketProtocol        g_socket_get_protocol            (GSocket                 *socket);
92GLIB_AVAILABLE_IN_ALL
92GLIB_AVAILABLE_IN_ALL
93GSocketAddress *       g_socket_get_local_address       (GSocket                 *socket,
94							 GError                 **error);
95GLIB_AVAILABLE_IN_ALL
96GSocketAddress *       g_socket_get_remote_address      (GSocket                 *socket,
97							 GError                 **error);
186GLIB_AVAILABLE_IN_ALL
187GSocket *              g_socket_accept                  (GSocket                 *socket,
188							 GCancellable            *cancellable,
api-index-2-22.html https://gitlab.com/ImageMagick/glib.git | HTML | 1,082 lines
715<dt>
716<a class="link" href="GSocketClient.html#g-socket-client-get-socket-type" title="g_socket_client_get_socket_type ()">g_socket_client_get_socket_type</a>, function in <a class="link" href="GSocketClient.html" title="GSocketClient">GSocketClient</a>
717</dt>
867<dt>
868<a class="link" href="GSocketListener.html#g-socket-listener-accept-socket" title="g_socket_listener_accept_socket ()">g_socket_listener_accept_socket</a>, function in <a class="link" href="GSocketListener.html" title="GSocketListener">GSocketListener</a>
869</dt>
871<dt>
872<a class="link" href="GSocketListener.html#g-socket-listener-accept-socket-async" title="g_socket_listener_accept_socket_async ()">g_socket_listener_accept_socket_async</a>, function in <a class="link" href="GSocketListener.html" title="GSocketListener">GSocketListener</a>
873</dt>
875<dt>
876<a class="link" href="GSocketListener.html#g-socket-listener-accept-socket-finish" title="g_socket_listener_accept_socket_finish ()">g_socket_listener_accept_socket_finish</a>, function in <a class="link" href="GSocketListener.html" title="GSocketListener">GSocketListener</a>
877</dt>
887<dt>
888<a class="link" href="GSocketListener.html#g-socket-listener-add-socket" title="g_socket_listener_add_socket ()">g_socket_listener_add_socket</a>, function in <a class="link" href="GSocketListener.html" title="GSocketListener">GSocketListener</a>
889</dt>
child_process.js https://gitlab.com/GeekSir/node.git | JavaScript | 1,396 lines
139
140      // remove handle from socket object, it will be closed when the socket
141      // will be sent
307  var sockets = slave._channel.sockets[type];
308  var socketList = sockets[key];
309  if (!socketList) {
310    var Construct = type === 'send' ? SocketListSend : SocketListReceive;
311    socketList = sockets[key] = new Construct(slave, key);
312  }
1179      // (which is the only one writable pipe)
1180      stdio.socket = createSocket(self.pid !== 0 ? stdio.handle : null, i > 0);
1181
1198  this.stdio = stdio.map(function(stdio) {
1199    return util.isUndefined(stdio.socket) ? null : stdio.socket;
1200  });
_tls_legacy.js https://gitlab.com/GeekSir/node.git | JavaScript | 916 lines
364CryptoStream.prototype.setTimeout = function(timeout, callback) {
365  if (this.socket) this.socket.setTimeout(timeout, callback);
366};
369CryptoStream.prototype.setNoDelay = function(noDelay) {
370  if (this.socket) this.socket.setNoDelay(noDelay);
371};
374CryptoStream.prototype.setKeepAlive = function(enable, initialDelay) {
375  if (this.socket) this.socket.setKeepAlive(enable, initialDelay);
376};
378CryptoStream.prototype.__defineGetter__('bytesWritten', function() {
379  return this.socket ? this.socket.bytesWritten : 0;
380});
578CleartextStream.prototype.__defineGetter__('localPort', function() {
579  return this.socket && this.socket.localPort;
580});
tls.markdown https://gitlab.com/GeekSir/node.git | Unknown | 946 lines
386      socket.setEncoding('utf8');
387      socket.pipe(socket);
388    });
526
527`socket` is an instance of [net.Socket][]
528
648
649`tlsSocket` is the [tls.TLSSocket][] that the error originated from.
650
926[tls.createSecurePair]: #tls_tls_createsecurepair_credentials_isserver_requestcert_rejectunauthorized
927[tls.TLSSocket]: #tls_class_tls_tlssocket
928[net.Server]: net.html#net_class_net_server
928[net.Server]: net.html#net_class_net_server
929[net.Socket]: net.html#net_class_net_socket
930[net.Server.address()]: net.html#net_server_address
dgram.markdown https://gitlab.com/GeekSir/node.git | Unknown | 313 lines
35
36Call `socket.bind()` if you want to receive datagrams. `socket.bind()` will
37bind to the "all interfaces" address on a random port (it does the right thing
79
80Emitted when a socket starts listening for datagrams.  This happens as soon as UDP sockets
81are created.
111assigned a random port number and is bound to the "all interfaces" address
112(`'0.0.0.0'` for `udp4` sockets, `'::0'` for `udp6` sockets.)
113
236
237Returns an object containing the address information for a socket.  For UDP sockets,
238this object will contain `address` , `family` and `port`.
304Calling `unref` on a socket will allow the program to exit if this is the only
305active socket in the event system. If the socket is already `unref`d calling
306`unref` again will have no effect.
IncomingSocket.cpp https://gitlab.com/gaurav1981/ricochet.git | C++ | 295 lines
89
90void IncomingSocket::removeSocket(QTcpSocket *socket)
91{
100
101    pendingSockets.removeOne(socket);
102
129{
130    QTcpSocket *socket = qobject_cast<QTcpSocket*>(sender());
131    if (!socket)
151
152bool IncomingSocket::handleVersion(QTcpSocket *socket)
153{
206
207void IncomingSocket::handleIntro(QTcpSocket *socket, uchar version)
208{
RouterSocketClient.java https://gitlab.com/gaurav1981/nogotofail.git | Java | 827 lines
178  /** @GuardedBy {@link #mLock} */
179  private Socket mSocket;
180  /** @GuardedBy {@link #mLock} */
449          SSLSocket sslSocket =
450              (SSLSocket) mSSLSocketFactory.createSocket(socket, serverHost, serverPort, true);
451          tryEnableSni(sslSocket, serverHost);
586    Log.d(TAG, "Connecting to " + host + ":" + port + " directly");
587    Socket socket = new Socket();
588    boolean success = false;
608    Log.d(TAG, "Connecting to " + host + ":" + port + " via HTTP proxy " + proxyAddress);
609    Socket socket = new Socket();
610    boolean success = false;
814    try {
815      socket.getClass().getMethod("setUseSessionTickets", boolean.class).invoke(socket, true);
816    } catch (NoSuchMethodException e) {
informix.lua https://gitlab.com/g10h4ck/nmap-gsoc2015.git | Lua | 1,329 lines
25--    - Implements a number of functions to handle communication over the
26--        the socket.
27--
324    if( len and len > 0 ) then
325      status, data = socket:receive_buf(match.numbytes(len), true)
326      if( not(status) ) then return false, "Failed to decode error response" end
1127  --
1128  -- @param socket containing a buffered socket connected to the server
1129  -- @return a new Comm instance
1133    self.__index = self
1134    o.socket = socket
1135    return o
1180    o.port = port
1181    o.socket = nmap.new_socket()
1182    o.instance = instance or "nmap_probe"
pgsql.lua https://gitlab.com/g10h4ck/nmap-gsoc2015.git | Lua | 621 lines
141  --
142  -- @param socket socket already connected to the pgsql server
143  -- @param data string containing any data already retrieved from the socket
164  --
165  -- @param socket socket already connected to the pgsql server
166  -- @param user string containing the name of the user
513  --
514  -- @param socket socket already connected to the pgsql server
515  -- @param user string containing the name of the user
554--
555-- @param socket socket already connected to the pgsql server
556-- @return boolean true if request was accepted, false if request was denied
606  local status, response
607  local socket = nmap.new_socket()
608
nmap.luadoc https://gitlab.com/g10h4ck/nmap-gsoc2015.git | Unknown | 826 lines
395-- result = ""
396-- socket = nmap.new_socket()
397-- catch = function()
424-- @see pcap_open
425-- @usage local socket = nmap.new_socket()
426function new_socket(protocol, af)
429--
430-- This socket method sets the local address and port of a socket. It must be
431-- called before <code>connect</code>. The address set by <code>bind</code>
515-- <code>nil</code>) along with an error string. The error strings are
516-- * <code>"Trying to send through a closed socket"</code>: There was no call to <code>socket:connect</code> before the send operation.
517-- * <code>"TIMEOUT"</code>: The operation took longer than the specified timeout for the socket.
693-- @usage
694-- local socket = nmap.new_socket()
695-- socket:pcap_open("eth0", 64, false, "tcp")
reference.txt https://gitlab.com/fuzzynemesis/hajaannu.git | text | 737 lines
111
112In case of local sockets (Unix Domain Sockets), socket:finish() simply closes
113the underlying socket and emulates EOF on subsequent reads. Also in this case,
118
119Same as socket:write(...) but additionally flushes the socket (i.e. all pending
120data is passed to the operating system).
255buffered, so to actually send out the data, it is necessary to eventually call
256socket:flush(), socket:finish(), or socket:close().
257
272buffered, so to actually send out the data, it is necessary to eventually call
273socket:flush_nb(), socket:flush(), socket:finish(), or socket:close().
274
338
339Tries to connect to a local socket (also known as Unix Domain Socket). Returns
340a socket object on success, or nil (as first return value) plus an error
fnet_error.h https://gitlab.com/fuggles/ucos.git | C++ Header | 252 lines
37*
38* @brief Socket error API definitions.
39*
65/**************************************************************************/ /*!
66 * @brief Possible socket error codes, returned by the @ref fnet_error_get(),
67 * or used by the @ref SO_ERROR option.
122                                     *   The attempted operation is not supported for the type
123                                     *   of socket referenced. This occurs, when socket cannot support
124                                     *   the requested operation, for example trying to accept
129                                     *   This error will be returned, if an address of a wrong family
130                                     *   is used for a socket in @ref socket(), @ref sendto(), @ref connect(),
131                                     *   @ref bind(), @ref getsockname(), and in @ref getpeername().
135                                     *   @ref connect() a socket to an IP address and port that has
136                                     *   already been used for an existing socket, or a socket that
137                                     *   wasn't closed properly, or one that is still in the process of closing.
CakeSocketTest.php https://gitlab.com/fouzia23chowdhury/cakephpCRUD.git | PHP | 374 lines
34		parent::setUp();
35		$this->Socket = new CakeSocket(array('timeout' => 1));
36	}
95			$config = array('persistent' => true);
96			$this->Socket = new CakeSocket($config);
97			$this->Socket->connect();
262		// testing exception on no ssl socket server for ssl and tls methods
263		$this->Socket = new CakeSocket($configNoSslOrTls);
264		$this->Socket->connect();
275		$configSslTls = array('host' => 'smtp.gmail.com', 'port' => 465, 'timeout' => 5);
276		$this->Socket = new CakeSocket($configSslTls);
277		try {
366		);
367		$this->Socket = new CakeSocket($config);
368		$this->Socket->connect();
transport_tcp.cpp https://gitlab.com/F34140r/ros_comm.git | C++ | 726 lines
123    ROS_DEBUG("Adding tcp socket [%d] to pollset", sock_);
124    poll_set_->addSocket(sock_, boost::bind(&TransportTCP::socketUpdate, this, _1), shared_from_this());
125  }
500    {
501      ROSCPP_LOG_DEBUG("send() on socket [%d] failed with error [%s]", sock_, last_socket_error_string());
502      close();
601  {
602    ROSCPP_LOG_DEBUG("Accepted connection on socket [%d], new socket [%d]", sock_, new_sock);
603
606    {
607      ROS_ERROR("Failed to set socket on transport for socket %d", new_sock);
608    }
613  {
614    ROS_ERROR("accept() on socket [%d] failed with error [%s]", sock_,  last_socket_error_string());
615  }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21