send multiple headers python socket? -


So, say that I am creating a TCP socket in Python, and authorizing the server, How do i As soon as I'm going to use the socket.sendall to send them, wait for the author's handshake response. After that, I need that as long as the data is received, I will wait for a data response, how do I even do it, because the socket is not closed if the data set is not available in time? Is there some easy way to send it correctly or what? ~~ Edit ~~ My main question I think is how to send a multi line packet?

using a type of python socket SOCK_STREAM , using the socket The .sendall (data) function only sends the string Yes, the data is just a string Now, you can create your own headers and lines and everything and put it in a string and the socket to the server You can ask to send it.

Then just socket. An integer of the number of bytes, where RCV (buffer) is buffer According to Thomas Orosco, TCP sockets can stay open for a very long time, so make sure the server gives a very quick answer. Edit: BTW, TCP is a Transportation Layer Protocol, you can read a little more here: Simply put, whatever you say for transport, TCP will transport. In Python, it's strings.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -