so i was sittin there one night, with actual free time on my hands, and I decided it was time to incorporate some python code into my renders in Blender. I want to form connections and create arrays and have all sorts of good connection fun with another computer. I need something to transfer strings and also data. The problems are that I need a protocol that is fast and reliable ( also simplistic ), and the protocol has to be able to handle files well.
I would pick FTP over SOCKET anyday for file transfer, but as for raw data involving variables, I think a SOCKET server could do an adiquate job. OR maybe I'm mistaken and the connection of sockets may take forever, and there might be something more suitable...
So my question is: FTP or SOCKET?
Or do I have to use both?
Name:
Anonymous2007-04-23 11:02 ID:U9Tgftv4
NO EXCEPTIONS
Name:
Anonymous2007-04-23 13:55 ID:8y5KrVgx
BLENDER RENDER
Name:
Anonymous2007-04-23 13:58 ID:PmyOLVsT
EXCEPTION FECESEPTION
Name:
Anonymous2007-04-23 15:56 ID:XE7DCiMQ
def start(self):
"""Opens a TCP socket"""
#Create socket
self.tcp_server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.log.verbose("TCP server socket opened")
#Bind socket to hostname:port
self.tcp_server.bind( (self.settings["Hostname"], self.settings["Port"]) )
self.log.verbose("TCP server socket bound to %s:%s"%(self.settings["Hostname"],
self.settings["Port"]))
#Start listening to socket, only accept one connection
self.tcp_server.listen(1)
Sockets is the shit! Also, I wrote this code, therefore I am cool. Also, the code needs more "try/catch" to be safe, but I'm only using this program myself, so I can't be assed with that.
Name:
Anonymous2007-04-23 15:59 ID:XE7DCiMQ
>>5
No, I'm not to fond of this self. stuff either, but what the heck.
Name:
Anonymous2007-04-23 16:02 ID:PmyOLVsT
One word would be too much, so I'll keep my mouth closed.