PageRenderTime 20ms queryFilters 21ms Sphinxql 564ms GetByIds 464ms meta 0ms repositoryFilters 50ms languageFilters 3ms sourceFilters 37ms

1,422,939 results for 'socket repo:lpimports/gcc' (20 ms)

Source

Language

Repository

lm-old-socket.c https://github.com/engineyard/loudmouth.git | C | 1,062 lines
93
94static void         socket_free                    (LmOldSocket    *socket);
95static gboolean     socket_do_connect              (LmConnectData  *connect_data);
144static gint
145old_socket_do_write (LmOldSocket *socket, const gchar *buf, guint len)
146{
1034void
1035lm_old_socket_asyncns_cancel (LmOldSocket *socket)
1036{
1044gboolean
1045lm_old_socket_get_use_starttls (LmOldSocket *socket)
1046{
1054gboolean
1055lm_old_socket_get_require_starttls (LmOldSocket *socket)
1056{
lm-old-socket.c https://github.com/mcabber/loudmouth.git | C | 1,067 lines
93
94static void         socket_free                    (LmOldSocket    *socket);
95static gboolean     socket_do_connect              (LmConnectData  *connect_data);
144static gint
145old_socket_do_write (LmOldSocket *socket, const gchar *buf, guint len)
146{
1038void
1039lm_old_socket_asyncns_cancel (LmOldSocket *socket)
1040{
1048gboolean
1049lm_old_socket_get_use_starttls (LmOldSocket *socket)
1050{
1058gboolean
1059lm_old_socket_get_require_starttls (LmOldSocket *socket)
1060{
socket.test https://github.com/LeifAndersen/TuxRider.git | Unknown | 1,667 lines
196
197test socket-1.1 {arg parsing for socket command} -constraints socket -body {
198    socket -server
235} -returnCodes error -result {cannot set -async option for server sockets}
236test socket-1.14 {arg parsing for socket command} -constraints socket -body {
237    socket -server foo -async
510set path(script) [makeFile {} script]
511test socket-2.9 {socket conflict} -constraints {socket stdio} -body {
512    set s [socket -server accept 0]
577
578test socket-3.1 {socket conflict} -constraints {socket stdio} -setup {
579    file delete $path(script)
837} -result {3 1 0}
838test socket-7.3 {testing socket specific options} -constraints socket -body {
839    set s [socket -server accept -myaddr 127.0.0.1 0]
socket.test https://bitbucket.org/tari/prizm-binutils | Unknown | 1,681 lines
214socket -server command ?-myaddr addr? port}}
215test socket-1.5 {arg parsing for socket command} {socket} {
216    list [catch {socket -myport} msg] $msg
513} {done 50}
514test socket-2.9 {socket conflict} {socket stdio} {
515    set s [socket -server accept 0]
528} {1 {couldn't open socket: address already in use}}
529test socket-2.10 {close on accept, accepted socket lives} {socket} {
530    set done 0
1448} {server socket was not inherited}
1449test socket-12.2 {testing inheritance of client sockets} {socket stdio exec} {
1450    removeFile script1
1535} {client socket was not inherited}
1536test socket-12.3 {testing inheritance of accepted sockets} {socket stdio exec} {
1537    removeFile script1
socket.pot https://bitbucket.org/pydocja/py33 | Unknown | 1,060 lines
361# d7d789a65eb54041bdbe10afdd39ee16
362msgid "Duplicate the file descriptor *fd* (an integer as returned by a file object's :meth:`fileno` method) and build a socket object from the result.  Address family, socket type and protocol number are as for the :func:`.socket` function above. The file descriptor should refer to a socket, but this is not checked --- subsequent operations on the object may fail if the file descriptor is invalid. This function is rarely needed, but can be used to get or set socket options on a socket passed to a program as standard input or output (such as a server started by the Unix inet daemon).  The socket is assumed to be in blocking mode."
363msgstr ""
776# 83ccaf03fd4e4b92a801154e5a6edec2
777msgid "On some systems, :meth:`sendmsg` and :meth:`recvmsg` can be used to pass file descriptors between processes over an :const:`AF_UNIX` socket.  When this facility is used (it is often restricted to :const:`SOCK_STREAM` sockets), :meth:`recvmsg` will return, in its ancillary data, items of the form ``(socket.SOL_SOCKET, socket.SCM_RIGHTS, fds)``, where *fds* is a :class:`bytes` object representing the new file descriptors as a binary array of the native C :c:type:`int` type.  If :meth:`recvmsg` raises an exception after the system call returns, it will first attempt to close any file descriptors received via this mechanism."
778msgstr ""
816# d3ed2dbaf81c42a79db2fa782c446da8
817msgid "Send data to the socket.  The socket must be connected to a remote socket.  The optional *flags* argument has the same meaning as for :meth:`recv` above. Returns the number of bytes sent. Applications are responsible for checking that all data has been sent; if only some of the data was transmitted, the application needs to attempt delivery of the remaining data. For further information on this topic, consult the :ref:`socket-howto`."
818msgstr ""
826# 467bf26a65a34f7aad2870bdd916c8eb
827msgid "Send data to the socket.  The socket should not be connected to a remote socket, since the destination socket is specified by *address*.  The optional *flags* argument has the same meaning as for :meth:`recv` above.  Return the number of bytes sent. (The format of *address* depends on the address family --- see above.)"
828msgstr ""
976# 335e390652a7407ca39d296b6a594d16
977msgid "Here are four minimal example programs using the TCP/IP protocol: a server that echoes all data that it receives back (servicing only one client), and a client using it.  Note that a server must perform the sequence :func:`.socket`, :meth:`~socket.bind`, :meth:`~socket.listen`, :meth:`~socket.accept` (possibly repeating the :meth:`~socket.accept` to service more than one client), while a client only needs the sequence :func:`.socket`, :meth:`~socket.connect`.  Also note that the server does not :meth:`~socket.sendall`/:meth:`~socket.recv` on the socket it is listening on but on the new socket returned by :meth:`~socket.accept`."
978msgstr ""
socket.js https://github.com/englishtown/Lettershowdown.git | JavaScript | 108 lines
1var socket;
2var mySID;
3
4function socket_connect() 
5{
6	//local test
7	socket = io.connect('http://localhost');
8	
9	//local ws test (working)
10	//socket = io.connect( 'http://localhost', {port:14584, rememberTransport: false} );
11	
12	//nodester (working)
13	//socket = io.connect( null, {port:80, rememberTransport: false} );
14	
15	//heroku (working)
16	//socket = io.connect( null, {port:80} );
17	
Socket.php https://github.com/anirvan/shindig-profiles.git | PHP | 295 lines
18 * @subpackage Client_Adapter
19 * @version    $Id: Socket.php 8064 2008-02-16 10:58:39Z thomas $
20 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
27/**
28 * A sockets based (stream_socket_client) adapter class for Zend_Http_Client. Can be used
29 * on almost every PHP environment, and does not require any special extensions.
42   */
43  protected $socket = null;
44  
122      
123      $this->socket = @stream_socket_client($host . ':' . $port, $errno, $errstr, (int)$this->config['timeout'], STREAM_CLIENT_CONNECT, $context);
124      if (! $this->socket) {
281  public function close() {
282    if (is_resource($this->socket)) @fclose($this->socket);
283    $this->socket = null;
srv.socket.js https://github.com/thomasdavis/noduino.git | JavaScript | 98 lines
14   * Define SocketHandler
15   * @param object socket Socket.IO
16   */
16   */
17  var SocketHandler = function(socket) {
18    this.sockets  = {};
40    io.sockets.on('connection', function(socket) {
41      that.sockets[socket.id] = socket;
42
45       */
46      that.sockets[socket.id].on('serial', function(data) {
47        switch (data.type) {
80       */      
81      that.sockets[socket.id].on('board.connect', function(data) {
82        if (that.current() && that.current().connected == true) {
socket.asm https://android.googlesource.com/toolchain/yasm | Assembly | 1,514 lines
153
154SOCKET_INIT		equ	5001h
155SOCKET_EXIT		equ	5002h
155SOCKET_EXIT		equ	5002h
156SOCKET_ACCEPT		equ	5003h
157SOCKET_BIND		equ	5004h
157SOCKET_BIND		equ	5004h
158SOCKET_CLOSE		equ	5005h
159SOCKET_CONNECT		equ	5006h
159SOCKET_CONNECT		equ	5006h
160SOCKET_GETPEERNAME	equ	5007h
161SOCKET_GETSOCKNAME	equ	5008h
467
468                push dword Socket_InterruptHandler_end-Socket_InterruptHandler
469
io.socket.on.md https://github.com/balderdashy/sails-docs.git | Unknown | 87 lines
1# io.socket.on()
2
16| 1 | `eventIdentity`      | ((string))   | The unique identity of a server-sent event, e.g. "recipe"
17| 2 | `callback` | ((function)) | Will be called when the server emits a message to this socket.
18
25
26Note that the callback will NEVER trigger until one of your back-end controllers, models, services, etc. sends a message to this socket.  Typically that is achieved one of the following ways:
27
28###### Resourceful Pubsub Methods
29+ server publishes a message about a record to which this socket is subscribed (see [Model.publishUpdate()](), [Model.publishDestroy()](), and [Model.subscribe()]())
30+ server publishes a message informing all permitted watcher sockets that a new record has been created in the model with the same identity as `eventIdentity` (see [Model.publishCreate()]() and [Model.watch()]())
32###### Low-Level Socket Methods
33+ server emits a message to all known sockets (see [sails.sockets.blast()]())
34+ server emits a message directly to this socket (`io.socket`) using its unique id (see [sails.sockets.emit()]())
34+ server emits a message directly to this socket (`io.socket`) using its unique id (see [sails.sockets.emit()]())
35+ server [broadcasts]() to a room in which this socket (`io.socket`) has been allowed to [join]() (remember that a socket only stays subscribed as long as it is connected-- i.e. as long as the browser tab is open)
36
socket.h https://github.com/apc-io/apc-rock-toolchain.git | C++ Header | 436 lines
1/* System-specific socket constants and types.  Linux version.
2   Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011
21#ifndef __BITS_SOCKET_H
22#define __BITS_SOCKET_H
23
24#ifndef _SYS_SOCKET_H
25# error "Never include <bits/socket.h> directly; use <sys/socket.h> instead."
26#endif
32
33/* Type for length arguments in socket calls.  */
34#ifndef __socklen_t_defined
38
39/* Types of sockets.  */
40enum __socket_type
61
62  /* Flags to be ORed into the type parameter of socket and socketpair and
63     used for the flags parameter of paccept.  */
socket.js https://github.com/anthonybrown/peerjs.git | JavaScript | 178 lines
1/**
2 * An abstraction on top of WebSockets and XHR streaming to provide fastest
3 * possible connection for peers.
5function Socket(host, port, key, id) {
6  if (!(this instanceof Socket)) return new Socket(host, port, key, id);
7  EventEmitter.call(this);
28/** Start up websocket communications. */
29Socket.prototype._startWebSocket = function() {
30  var self = this;
35
36  this._socket = new WebSocket(this._wsUrl);
37  
145Socket.prototype._wsOpen = function() {
146  return !!this._socket && this._socket.readyState == 1;
147};
Socket.cpp https://github.com/Krozark/cpp-Socket.git | C++ | 209 lines
16
17Socket::Socket(Socket::Domain domain,Socket::Type type,int protocole) : sock(INVALID_SOCKET), need_connect(type == Socket::Type::TCP), proto(protocole)
18{
30
31Socket::Socket(bool need_conn) : sock(INVALID_SOCKET), need_connect(need_conn),proto(0)
32{
90
91        if((sock = ::socket(domain,type,proto)) == INVALID_SOCKET)
92        {
154        perror("accept()");
155        throw SocketExeption("Invalid socket on accept");
156    }
159
160bool Socket::shutdown(Socket::Down mode)
161{
socket.lua https://github.com/RainVision/skynet.git | Lua | 80 lines
1local skynet = require "skynet"
2local c = require "socket.c"
3
3
4local socket = {}
5local fd
13		for _,v in ipairs(tmp) do
14			socket.write(fd, v)
15		end
18
19function socket.connect(addr)
20	local ip, port = string.match(addr,"([^:]+):(.+)")
21	port = tonumber(port)
22	socket.close()
23	fd = c.open(ip,port)
socket.c https://github.com/jzeaherra/xbmc-pvr-addons.git | C | 2,939 lines
20/*
21 * socket.c - functions to handle low level socket interactions with a
22 *            MythTV frontend.
134 * Receive the <length> portion of a MythTV Protocol message
135 * on the socket specified by 'conn'
136 *
281 * string: []:[] or terminated by running out of message.  Up to
282 * 'count' Bytes will be consumed from the socket specified by 'conn'
283 * (stopping when a separator is seen or 'count' is exhausted).  Of
435 * running out of message.  Up to 'count' Bytes will be consumed from
436 * the socket specified by 'conn' (stopping when a separator is seen
437 * or 'count' is exhausted).  The unsigned long long integer value of
1151 * running out of message.  Up to 'count' Bytes will be consumed from
1152 * the socket specified by 'conn' (stopping when a separator is seen
1153 * or 'count' is exhausted).  The unsigned short integer value of the
Socket.php https://github.com/xxOrpheus/EtherRS.git | PHP | 173 lines
30			$this->currentStream[0]->clear();
31			$data = @socket_read($this->currentSocket, $bytes, PHP_BINARY_READ);
32		} else {
86	 *
87	 * @param Socket $socket    The socket to add
88	 * @param string $name      The name to use
103		if($setActive === true) {
104			$this->currentSocket = $socket;
105		}
151			return false;
152		$this->currentSocket = $this->activeSockets[$name];
153	}
163		if($name === null) {
164			return socket_last_error($this->currentSocket);
165		} else {
socket.lua https://github.com/evoup/skynet.git | Lua | 81 lines
1local skynet = require "skynet"
2local c = require "socket.c"
3
3
4local socket = {}
5local fd
13		for _,v in ipairs(tmp) do
14			socket.write(fd, v)
15		end
18
19function socket.connect(addr)
20	local ip, port = string.match(addr,"([^:]+):(.+)")
21	port = tonumber(port)
22	socket.close()
23	fd = c.open(ip,port)
socket.js https://github.com/benjaminfisher/github-repositories.git | JavaScript | 155 lines
1/*
2 * Chrome Extension Socket
3 * <https://github.com/jjNford/chrome-extension-socket>
27
28	window.Socket = {
29	
42				if(port.name === "popupToBackground") {
43					Socket.port = chrome.extension.connect({name: "backgroundToPopup"});
44				}
47				port.onMessage.addListener( function(msg) {
48					Socket.onMessage(msg);
49				});
51				// Attach disconnection listener to port.
52				Socket.port.onDisconnect.addListener( function(port) {
53					port.onMessage.removeListener();
socket.c https://github.com/xhaggi/xbmc-pvr-addons.git | C | 3,001 lines
20/*
21 * socket.c - functions to handle low level socket interactions with a
22 *            MythTV frontend.
134 * Receive the <length> portion of a MythTV Protocol message
135 * on the socket specified by 'conn'
136 *
281 * string: []:[] or terminated by running out of message.  Up to
282 * 'count' Bytes will be consumed from the socket specified by 'conn'
283 * (stopping when a separator is seen or 'count' is exhausted).  Of
435 * running out of message.  Up to 'count' Bytes will be consumed from
436 * the socket specified by 'conn' (stopping when a separator is seen
437 * or 'count' is exhausted).  The unsigned long long integer value of
1151 * running out of message.  Up to 'count' Bytes will be consumed from
1152 * the socket specified by 'conn' (stopping when a separator is seen
1153 * or 'count' is exhausted).  The unsigned short integer value of the
Socket.php https://github.com/vib94/Framework.git | PHP | 272 lines
82		
83		$written = @socket_write($this->_socket, $stream, $length);
84		
212	
213		$int = socket_last_error($this->_socket);
214		
227			
228		if(!socket_bind($this->_socket, $this->_address))
229			throw new Yab_Exception('can not bind socket to "'.$this->_address.'" '.$this->error());
230		
231		if(!socket_connect($this->_socket, $this->_address, $this->_port))
232			throw new Yab_Exception('can not connect socket to "'.$this->_address.':'.$this->_port.'" '.$this->error());
244			
245		socket_close($this->_socket);
246		
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21