Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.75 KB | None | 0 0
  1.     def ready(self):
  2.         """
  3.        After login, make `client` and `client_in` instance
  4.        to communicate with LINE server
  5.        """
  6.         self.transport    = THttpClient.THttpClient(self.LINE_HTTP_URL)
  7.         self.transport_in = THttpClient.THttpClient(self.LINE_HTTP_IN_URL)
  8.  
  9.         self.transport.setCustomHeaders(self._headers)
  10.         self.transport_in.setCustomHeaders(self._headers)
  11.  
  12.         self.protocol    = TCompactProtocol.TCompactProtocol(self.transport)
  13.         self.protocol_in = TCompactProtocol.TCompactProtocol(self.transport_in)
  14.  
  15.         self._client    = CurveThrift.Client(self.protocol)
  16.         self._client_in = CurveThrift.Client(self.protocol_in)
  17.  
  18.         self.transport.open()
  19.         self.transport_in.open()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement