Lines Matching refs:self
76 def handle(self): argument
78 neg = Negotiator(self.request)
105 self.request.sendall(response_data)
109 self.request.settimeout(0.1)
110 self.request.recv(4*1024)
111 self.request.shutdown(socket.SHUT_RDWR)
125 def __init__(self, tcp): argument
126 self.tcp = tcp
127 self.state = self.NO_NEG
129 def recv(self, bytes): argument
142 data = self.tcp.recv(bytes)
148 if self.state == self.NO_NEG:
149 self.no_neg(byte_int, buffer)
150 elif self.state == self.START_NEG:
151 self.start_neg(byte_int)
152 elif self.state in [self.WILL, self.WONT, self.DO, self.DONT]:
153 self.handle_option(byte_int)
158 self.state)
159 self.state = self.NO_NEG
163 def no_neg(self, byte_int, buffer): argument
169 self.state = self.START_NEG
174 def start_neg(self, byte_int): argument
182 self.state = self.WILL
187 self.state = self.WONT
191 self.state = self.DO
195 self.state = self.DONT
200 self.state)
201 self.state = self.NO_NEG
203 def handle_option(self, byte_int): argument
212 self.state = self.NO_NEG
218 self.state)
219 self.state = self.NO_NEG
221 def send_message(self, message_ints): argument
222 self.tcp.sendall(bytearray(message_ints))
224 def send_iac(self, arr): argument
227 self.send_message(message)
229 def send_do(self, option_str): argument
231 self.send_iac([NegTokens.DO, NegOptions.to_val(option_str)])
233 def send_dont(self, option_str): argument
235 self.send_iac([NegTokens.DONT, NegOptions.to_val(option_str)])
237 def send_will(self, option_str): argument
239 self.send_iac([NegTokens.WILL, NegOptions.to_val(option_str)])
241 def send_wont(self, option_str): argument
243 self.send_iac([NegTokens.WONT, NegOptions.to_val(option_str)])