Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

FTP or SOCKET server in python???

Name: Fox64 2007-01-12 12:31

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: Anonymous 2007-04-23 11:02 ID:U9Tgftv4

NO EXCEPTIONS

Name: Anonymous 2007-04-23 13:55 ID:8y5KrVgx

BLENDER RENDER

Name: Anonymous 2007-04-23 13:58 ID:PmyOLVsT

EXCEPTION FECESEPTION

Name: Anonymous 2007-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: Anonymous 2007-04-23 15:59 ID:XE7DCiMQ

>>5
No, I'm not to fond of this self. stuff either, but what the heck.

Name: Anonymous 2007-04-23 16:02 ID:PmyOLVsT

One word would be too much, so I'll keep my mouth closed.

Name: Anonymous 2007-04-23 17:00 ID:XE7DCiMQ

>>7
Excellent choice!

Name: Anonymous 2007-04-23 18:37 ID:JaUYHr5P

>>7
You said 12 more words than you promised you would say.

Name: Anonymous 2009-01-14 13:58

YOU ARE NOW THINKING MANUALLY

Name: Anonymous 2010-12-06 9:10

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-08 21:47

Name: Anonymous 2010-12-09 3:26

Name: Anonymous 2010-12-20 21:26

Name: Anonymous 2010-12-20 21:32

Name: Anonymous 2011-02-03 4:44

Name: Sgt.Kabu섬Xkiman佬ـ 2012-05-28 21:44

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List