Lines Matching defs:socket

26 import io, logging, socket, os, pickle, struct, time, re
532 a streaming socket. The socket is kept open across logging calls.
546 When the attribute *closeOnError* is set to True - if a socket error
547 occurs, the socket is silently closed and then reopened on the next
570 type of socket they want.
573 result = socket.create_connection(self.address, timeout=timeout)
575 result = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
586 Try to create a socket, using an exponential backoff with
614 Send a pickled string to the socket.
634 returns it ready for transmission across the socket.
658 connection lost. Close the socket so that we can retry on the
671 Pickles the record and writes it to the socket in binary format.
672 If there is an error with the socket, silently drop the packet.
673 If there was a problem with the socket, re-establishes the
674 socket.
684 Closes the socket.
699 a datagram socket. The pickle which is sent is that of the LogRecord's
717 a UDP socket (SOCK_DGRAM).
720 family = socket.AF_UNIX
722 family = socket.AF_INET
723 s = socket.socket(family, socket.SOCK_DGRAM)
728 Send a pickled string to a socket.
853 If address is specified as a string, a UNIX socket is used. To log to a
856 specified as socket.SOCK_DGRAM or socket.SOCK_STREAM, that specific
857 socket type will be used. For Unix sockets, you can also specify a
858 socktype of None, in which case socket.SOCK_DGRAM will be used, falling
859 back to socket.SOCK_STREAM.
866 self.socket = None
872 use_socktype = socket.SOCK_DGRAM
873 self.socket = socket.socket(socket.AF_UNIX, use_socktype)
875 self.socket.connect(address)
879 self.socket.close()
883 use_socktype = socket.SOCK_STREAM
884 self.socket = socket.socket(socket.AF_UNIX, use_socktype)
886 self.socket.connect(address)
890 self.socket.close()
895 Try to create a socket and, if it's not a datagram socket, connect it
899 if there is no socket at that point.
917 socktype = socket.SOCK_DGRAM
919 ress = socket.getaddrinfo(host, port, 0, socktype)
926 sock = socket.socket(af, socktype, proto)
927 if socktype == socket.SOCK_STREAM:
936 self.socket = sock
954 Closes the socket.
958 sock = self.socket
960 self.socket = None
1002 if not self.socket:
1007 self.socket.send(msg)
1009 self.socket.close()
1011 self.socket.send(msg)
1012 elif self.socktype == socket.SOCK_DGRAM:
1013 self.socket.sendto(msg, self.address)
1015 self.socket.sendall(msg)