Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
pyzor
/
File Content:
server.pyc
� YF�Tc @ s� d Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z y d d l Z Wn e k r� d d l Z n Xd d l Z d d l Z d d l Z d d l Z e j j j � d � Z d e j f d � � YZ d e f d � � YZ d e j e f d � � YZ d e f d � � YZ d e j e f d � � YZ d e j f d � � YZ! d S( s� Networked spam-signature detection server. The server receives the request in the form of a RFC5321 message, and responds with another RFC5321 message. Neither of these messages has a body - all of the data is encapsulated in the headers. The response headers will always include a "Code" header, which is a HTTP-style response code, and a "Diag" header, which is a human-readable message explaining the response code (typically this will be "OK"). Both the request and response headers always include a "PV" header, which indicates the protocol version that is being used (in a major.minor format). Both the requestion and response headers also always include a "Thread", which uniquely identifies the request (this is a requirement of using UDP). Responses to requests may arrive in any order, but the "Thread" header of a response will always match the "Thread" header of the appropriate request. Authenticated requests must also have "User", "Time" (timestamp), and "Sig" (signature) headers. i����Nc G sQ xJ t rL y | | � SWq t k rH } | j d t j k rI � qI q Xq Wd S( s* restart a system call interrupted by EINTRi N( t Truet OSErrort argst errnot EINTR( t funcR t e( ( s0 /usr/lib/python2.7/site-packages/pyzor/server.pyt _eintr_retry/ s t Serverc B sJ e Z d Z d Z d Z d d � Z d � Z d � Z d � Z d � Z RS( s_ The pyzord server. Handles incoming UDP connections in a single thread and single process.i i� c C sl d | d k r t j t _ n t j t _ t j d � | _ t j d � | _ | | _ t | j d t � | _ | | _ | | _ i | _ i | _ | j � | | _ | j j d | � t j j | | t d t �y | j j t j t j d � Wn/ t t j f k r'} | j j d | � n X| j � | j � t j t j | j! � t j t j"