Похожие чаты

Hey guys, is tcp write synchronous? I mean if we were to

do:

go tcpConn.write(data1); // 1
go tcpConn.write(data2); // 2
go tcpConn.write(data3); // 3
go tcpConn.write(data4); // 4
Will they reach the receiving end one after another? Or It's possible that their data conflict with one another but that's the role of tcp to handle that?

7 ответов

23 просмотра

I don’t think this is a good idea. AFAIK concurrent access to a socket must be synchronized

ㅤ- Автор вопроса
Roman Sharkov
I don’t think this is a good idea. AFAIK concurren...

So do you know how Telegram handles both text and file transmit? Is it happening on one port or they use several ports? because here it's possible to send a text message while a file is uploading


So do you know how Telegram handles both text and ...

there’s only 0 and 1 being transmitted over the wire.. text is binary data too you just take UTF-8 text and turn it into []byte

ㅤ- Автор вопроса
Roman Sharkov
and this is called “multiplexing”

So this multiplexing frames the data in a way that the server understands which bytes belong to the text message and which to the file. Sounds tough lol.

ㅤ- Автор вопроса
Roman Sharkov
sure

Thanks, you saved me from observing open source Russian code lol

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта