C
C#17mo ago
Joao

❔ Problem with Sockets

I'm working with Socket in C#, and sometimes, I need to send messages in sequence, but it's happening that when I send messages in sequence, the messages join in only 1, plus that if I put a delay of 100ms between the messages. Why does it happen? Buffer supports message size as it is small. https://pastebin.com/cV6HAk18
Pastebin
using System;using System.Collections.Generic;using System.Diagnost...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
2 Replies
Omnissiah
Omnissiah17mo ago
socket doesn't have the concept of message, if that's what you mean it's just a stream of bytes if you want to use a packet that has a beginning and an end you either do it yourself or search for a class that already does it also this if (resposta == ""){ should be this if (bytesRecebidos == 0) { and i would also warn against this stuff Thread.Sleep(5000);
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server