Questions tagged [sdl-net]

This is a small sample cross-platform networking library, with a sample chat client and server application. The chat client uses the GUIlib GUI framework library.

This is a small sample cross-platform networking library, with a sample chat client and server application. The chat client uses the GUIlib GUI framework library.

27 questions
0
votes
1 answer

SDLNet detect not existing host

SDLNet_ResolveHost always return 0 no matter if there is any host on that IP and port. According to the documentation it should return -1 when an error occurs. How can a non existing host be detected?
user11914177
  • 885
  • 11
  • 33
0
votes
1 answer

SDLnet check if TCPsocket has closed connection

How can I check if a SDLnet TCPsocket has closed the connection? I tried checking if the socket is NULL but it doesn't work, this is what I tried: for(int i = 0; i < clientConnections.size(); i++) { if(!clientConnections[i]) { …
user11914177
  • 885
  • 11
  • 33
0
votes
0 answers

TCP Connexion between Xamarin.Android and SDL_Net

I'm trying to establish a TCP connexion between a C# Xamarin Android app and a C++ app on a Raspberry pi. On the C# client side, I'm using the TcpClient client from System.Net.Sockets : // C# static public bool Connect(string IP, string port) { …
G.Vernier
  • 369
  • 2
  • 14
0
votes
1 answer

Thread query SDL_Net

Running my listen function in a seperate thread seems to use up a lot of CPU Is it considered ok to use Delays to reduce cpu usage or am I using threads all wrong ? // Running in a seperate Thread void Server::listen() { while (m_running) …
0
votes
1 answer

SDL_net doesn't receive UDP packets

I'm trying to communicate with my esp8266 and as you can see, I successfully receive a packet from it every 2 seconds: wireshark screenshot wireshark but it seems like I don't receive any data in my SDL_net app (the if in the while at the end stays…
vyzigold
  • 1
  • 2
0
votes
1 answer

uint32_t variable is strange changing

I have simple code: #define NUM_UA_SOCK 100 typedef struct _UA_REQUEST { string full_url; uint32_t url_adler32 ; TCPsocket sock_ua ; uint32_t status_flag ; // ref Enum STATUS } UA_REQUEST ; UA_REQUEST …
Slava
  • 53
  • 1
  • 5
0
votes
2 answers

HTTP over TCP/IP?

I am trying to use CPP and SDL_Net to make a HTTP Client. I'm using a char [] buffer to send and receive information. Basically, I connect to the site mentioned below on port 80: strcpy(buffer,"GET / HTTP/1.0 \n host:…
acenturyandabit
  • 1,188
  • 10
  • 24
0
votes
1 answer

Possible SDL_Net issue and Using openCV to display a YUV camera frame from memory

I am having issues with getting an image from the camera on a raspberry pi over a network and on to a pandaboard(running ubuntu 12.04) to display correctly. The data I get from the camera is the raw YUV data at 1280x720 resolution. I think my SDL…
0
votes
1 answer

Issue with network app using some browsers

I have simple proxy app, that listens connections from browser on port 4711. Then app sends requests to server (own app) and compares server's version of requested data with local cache and then applies that difference and sends data back to…
vns955
  • 3
  • 6
0
votes
1 answer

SDL_Net ignores passed port value and starts server on random free port

I'm trying a write something like a small proxy on SDL & SDL_Net. My program successfully creates a server and waits for incoming connection. But for some reason it ignores entered port and always uses 24862. If I start another instance, it picks…
HolyBlackCat
  • 78,603
  • 9
  • 131
  • 207
-1
votes
2 answers

Windows Winsock redefinition errors regarding asio/SteamAPI/libssh/SDL_net

Any time I try to use more than 1 networking library in the same (CMake) project, there are many Winsock redefinition errors. These libraries are asio, SteamAPI, libssh, and SDL_net to name a few. I turned to Google for answers, and there are many…
crazicrafter1
  • 309
  • 5
  • 18
-1
votes
1 answer

SDL_net no opengl context has been made

I'm following a tutorial on SDL_net and am quite confused on why my program is crashing. You can find the tutorial here. My client crashes after running it with the server open. I'm just wondering what this error means (using SDLNet_GetError()): no…
genfy
  • 83
  • 3
  • 4
  • 18
1
2