Hey,
time to make a fool of myself again! So, another amateurish networking question:
I've been toying around with making a simple socket receiving server:
#include <acknex.h>
#include <default.c>
TEXT* txtReceive = { flags = SHOW; }
function main()
{
char input[1001];
if(!socket_connect (NULL,300,0))
{
printf("Error!");
return;
}
while(1) {
wait(1);
int received = socket_receive(input,1000);
if (received) {
input[received] = 0;
txt_addstring(txtReceive,input);
}
}
}
this correctly displays incoming UDP messages to port 300. Now I want the same for TCP messages... am I even able to do this? when I change socket_connect to use TCP, the connection fails... I've been trying and trying but can't get this to work. Any help?
Edit: trying anet plugin now...