T
T
TyLo2018-06-28 12:53:02
Computer networks
TyLo, 2018-06-28 12:53:02

How to send data over the network using TCP?

I'm not special in this matter, but I'm interested, therefore, if the question is too stupid, then don't beat me))
How can I transfer data over the global network using TCP, and not the HTTP protocol?
PS: I am UX to the core, but interested in networks.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
C
CityCat4, 2018-06-28
@TyLo

"The usual way. Uh-huh. Uh-huh ..." - said Winnie the Pooh (C)
Write a daemon program that opens a port and waits for connections. Write a client program that establishes a connection. After the connection is established, you can move the data back and forth as you like, according to your own rules. If you want encryption - screw openssl - it's certainly not elementary simple, but there are training examples ...
I can even share an example (for UNIX, of course) - the simplest demon written in 1998. For any request on port 3100 it gives a text string with the current time, it can't do anything else: D Soap in the profile.

V
VoidVolker, 2018-06-28
@VoidVolker

lmgtfy.com/?q=socket

R
res2001, 2018-06-28
@res2001

Find a book online: U.R. Stevens. Unix. Development of network applications.
One of the best books on the subject, even though it's a bit old.
Despite the fact that there is UNIX, but the approach is the same for almost all operating systems.

E
Egor Kazantsev, 2018-06-28
@saintbyte

Why do you need TCP , transmit over the same HTTP . Because HTTP over TCP. If you want to move away from stateless, raise web sockets to HTTP and drive data over them.

S
Stanislav Makarov, 2018-06-28
@Nipheris

https://en.wikipedia.org/wiki/Berkeley_sockets
Boost.Asio

S
Stanislav Bodrov, 2018-06-30
@jenki

How can data be transmitted over the global network using TCP rather than HTTP protocol
FTP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question