Did I find the right examples for you? yes no

All Samples(23513)  |  Call(14)  |  Derive(3)  |  Import(23496)
This module provides socket operations and some related functions.
On Unix, it supports IP (Internet Protocol) and Unix domain sockets.
On other systems, it only supports IP. Functions specific for a
socket are available as methods of the socket object.

Functions:

socket() -- create a new socket object
socketpair() -- create a pair of new socket objects [*]
fromfd() -- create a socket object from an open file descriptor [*]
gethostname() -- return the current hostname
gethostbyname() -- map a hostname to its IP number
gethostbyaddr() -- map an IP number or hostname to DNS info
getservbyname() -- map a service name and a protocol name to a port number
getprotobyname() -- map a protocol name (e.g. 'tcp') to a number
ntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order
htons(), htonl() -- convert 16, 32 bit int from host to network byte order
inet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format
inet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89)
ssl() -- secure socket layer support (only available if configured)
socket.getdefaulttimeout() -- get the default timeout value
socket.setdefaulttimeout() -- set the default timeout value
create_connection() -- connects to an address, with an optional timeout and
                       optional source address.

 [*] not available on all platforms!

Special objects:

SocketType -- type object for socket objects
error -- exception raised for I/O errors
has_ipv6 -- boolean value indicating if IPv6 is supported

Integer constants:

AF_INET, AF_UNIX -- socket domains (first argument to socket() call)
SOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)

Many other constants may be defined; these may be used in calls to
the setsockopt() and getsockopt() methods.

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/TCP_Systems/HTTP/KamaeliaWebServer.py   kamaelia(Download)
 
# Import socket to get at constants for socketOptions
import socket
import pprint
 

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/TCP_Systems/HTTP/cookbook_2.py   kamaelia(Download)
"""
 
import socket
import Axon
 

src/k/a/kamaelia-HEAD/Sketches/MPS/BugReports/FixTests/Kamaelia/Examples/TCP_Systems/HTTP/cookbook_1.py   kamaelia(Download)
 
# Import socket to get at constants for socketOptions
import socket
 
# Import the server framework, the HTTP protocol handling and the minimal request handler

src/a/n/antisocial-HEAD/ve/share/doc/ipython/examples/parallel/wave2D/communicator.py   antisocial(Download)
#!/usr/bin/env python
"""A simple Communicator class that has N,E,S,W neighbors connected via 0MQ PEER sockets"""
 
import socket
 

src/a/n/antisocial-HEAD/ve/share/doc/ipython/examples/parallel/interengine/communicator.py   antisocial(Download)
import socket
 
import uuid
import zmq
 

src/a/n/antisocial-HEAD/ve/share/doc/ipython/examples/parallel/interengine/bintree.py   antisocial(Download)
import cPickle as pickle
import re
import socket
import uuid
 

src/a/n/antisocial-HEAD/ve/share/doc/ipython/examples/parallel/demo/dependencies.py   antisocial(Download)
def checkhostname(host):
    import socket
    return socket.gethostname() == host
 
def getpid():

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Examples/TCP_Systems/HTTP/KamaeliaWebServer.py   kamaelia(Download)
 
# Import socket to get at constants for socketOptions
import socket
import pprint
 

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Examples/TCP_Systems/HTTP/cookbook_2.py   kamaelia(Download)
"""
 
import socket
import Axon
 

src/k/a/kamaelia-HEAD/Code/Python/Kamaelia/Examples/TCP_Systems/HTTP/cookbook_1.py   kamaelia(Download)
 
# Import socket to get at constants for socketOptions
import socket
 
# Import the server framework, the HTTP protocol handling and the minimal request handler

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next