Search:

Search: Search took 1.00 seconds.

  1. Replies
    12
    Views
    12,583

    You could just add an error check: i =...

    You could just add an error check:



    i = recvfrom(Socket, response, sizeof(response), 0, 0, 0);
    if (i == SOCKET_ERROR) {
    Com_Printf("recvfrom failed with error %d\n", WSAGetLastError());
    ...
  2. Replies
    12
    Views
    12,583

    To make sure this is not a non-blocked-recvfrom()...

    To make sure this is not a non-blocked-recvfrom() issue, can you try:



    sendto(Socket, data, strlen(data), 0, (SOCKADDR *)&server, sizeof(server));
    Sleep(1000); // just to wait till there is...
  3. Replies
    12
    Views
    12,583

    Shouldnt data be terminated by \0? There is no...

    Shouldnt data be terminated by \0? There is no room for it in the [9].
  4. Replies
    12
    Views
    12,583

    Your message should show up in wireshark....

    Your message should show up in wireshark. (https://www.wireshark.org/)

    Try this. With the output you should be able to see if it worked.


    void gsc_utils_foo() {
    char *ip;
    int port;
    ...
  5. Replies
    12
    Views
    12,583

    How do you call your function in cod2? Like...

    How do you call your function in cod2?

    Like this

    foo("1.1.1.1", 28962);



    int port;
    char *srt;
  6. Replies
    12
    Views
    12,583

    Can you post your changes? I can't say what is...

    Can you post your changes? I can't say what is wrong with so little code. You could use Wireshark to see if your message gets send.
    Also you could try debugging your function with printf (for...
Results 1 to 6 of 6