pymensago/serverconn.py
def write(self, text: str) -> RetVal:
		'''Sends a string over a socket'''

		if not self.socket:
			return RetVal(ErrNetworkError, 'Invalid connection')
		
		try:
			self.socket.send(text.encode())
		except Exception as e:
			self.socket.close()
			return RetVal().wrap_exception(e)
		
		return RetVal()
Sends a string over a socket
Sends a string over a socket
Sends a string over a socket
def write(self, text: str) -> RetVal:
		if not self.socket:
			return RetVal(ErrNetworkError, 'Invalid connection')
		try:
			self.socket.send(text.encode())
		except Exception as e:
			self.socket.close()
			return RetVal().wrap_exception(e)
		return RetVal()
def write ( self , text : str ) -> RetVal : if not self . socket : return RetVal ( ErrNetworkError , 'Invalid connection' ) try : self . socket . send ( text . encode ( ) ) except Exception as e : self . socket . close ( ) return RetVal ( ) . wrap_exception ( e ) return RetVal ( )
Sends a string over a socket
Sends a string over a socket
'''Sends a string over a socket'''
self
text
str