Search:

Type: Posts; User: v333k

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,453

    CommonTater, Adak & Salem, thanks a lot! Makes...

    CommonTater, Adak & Salem,
    thanks a lot!
    Makes sense now...
  2. Replies
    5
    Views
    1,453

    #define - something I need to understand

    Hi all,
    I've been programming in C language for a while now, years to be realistic.
    I was looking at this file today, and I came across something that is (as an assumption) extremely easy, but for...
  3. Replies
    1
    Views
    3,342

    One of my first steps that I took when I started...

    One of my first steps that I took when I started learning about sockets is to read about the topic, familiarize yourself with the environment and then just take a dive and see what happens.
    This...
  4. Replies
    8
    Views
    59,288

    Adding some comments. The previous code seems to...

    Adding some comments.
    The previous code seems to actually work (post #8) with the one minor change of all select functions need to be as follows:


    select_return = select(accept_socket+1, ........
  5. Replies
    8
    Views
    59,288

    Salem, Thanks again for your input. I guess I...

    Salem,
    Thanks again for your input. I guess I wasn't thinking too much about it or else the scenario you mentioned would clearly provide an answer.

    My question now is after looking at this for...
  6. Replies
    8
    Views
    59,288

    I need to ask a really dumb question.... If I...

    I need to ask a really dumb question....
    If I create a non-blocking socket, it needs to be implemented on the host and the client, correct?

    thanks
  7. Replies
    8
    Views
    59,288

    Thanks brewbuck. So now I have re-written some...

    Thanks brewbuck.
    So now I have re-written some of the code to utilize the select() function among others FD_SET, FD_ISSET, etc...
    I am still seeing some weird behavior, but I will work on it some...
  8. Replies
    8
    Views
    59,288

    Thanks Salem for your reply. I did leave out a...

    Thanks Salem for your reply.
    I did leave out a bit of code that does error handling and checking.

    Before I clarify what I meant with "takes less than a second to quit on me" let me say this...
  9. Replies
    8
    Views
    59,288

    non-blocking socket with a timeout

    Hi everyone...
    I was trying to read other threads before I submit a duplicate, but I think I have some conceptual problem about setting non-blocking sockets with timeouts.

    Basically, what I want...
  10. Replies
    4
    Views
    1,966

    thanks jeffcobb. I will keep that in mind.

    thanks jeffcobb. I will keep that in mind.
  11. Replies
    4
    Views
    1,966

    oh you are good..... I just fixed it (and that...

    oh you are good.....

    I just fixed it (and that was indeed the missing step) but it is amazing that you didn't see my code to really assume that this step wasn't happening....

    appreciate your...
  12. You should use scanf("%d", &points[game]); ...

    You should use

    scanf("%d", &points[game]);

    Also, as msh said, you should use the index starting from 0.

    However, one quick thing to do is to print all the numbers on the screen to verify...
  13. Replies
    4
    Views
    1,966

    socket freezing....

    I am working on this program that utilizes sockets.
    So far, I have created all I need but I am running into this problem when performing the following steps:

    I have a client and a host, and the...
  14. Replies
    4
    Views
    4,542

    Great! That fixed it.... although something...

    Great! That fixed it.... although something funny is going on but I worked around it.

    Thanks again brewbuck for your help!
  15. Replies
    4
    Views
    4,542

    Thanks brewbuck! Right now, my ip is displaying...

    Thanks brewbuck!
    Right now, my ip is displaying 3.4.1.10
    I am one step closer to the answer....


    Is there a functionality in the socket library that resembles the ping command?

    Usually, I...
  16. Replies
    4
    Views
    4,542

    Socket address (convert to string "10.1.4.3")

    Hi all,
    I am working on a socket program and once I have merged two different programs together, I found out that there is an inconsistency that I am not able to find the answer to.

    My program...
  17. Thanks bernt, I played with it some more and to...

    Thanks bernt,
    I played with it some more and to my surprise, adding MS_RDONLY flag during the mount makes it work - not sure why since I can still write to the USB as well as delete, change content...
  18. using sys/mount.h and mounting a USB thumb drive

    I am working on a small program written in C to mount and unmount a USB thumb drive on a Linux Ubuntu (Please see code below for mounting and unmounting). The problem I am facing is that each time...
  19. Replies
    2
    Views
    1,723

    thanks tabstop!!!

    thanks tabstop!!!
  20. Replies
    2
    Views
    1,723

    command line arguments and semi-colon

    Hi all,
    I've been playing around on a linux OS Ubuntu 9.04 and I wrote a small program that takes in a string as an argument.

    The string is somewhat complicated so I terminate it with a ;...
  21. Replies
    2
    Views
    4,252

    Thanks! I should've looked into the errno...

    Thanks!
    I should've looked into the errno before asking this question..... silly me!

    Thanks again!
  22. Thread: rand() function

    by v333k
    Replies
    10
    Views
    15,552

    your problem is simple.... if you want to get...

    your problem is simple....

    if you want to get a number between 0 and 1, then you can't declare it as int x;
    you should declare it as float x;
  23. Replies
    2
    Views
    4,252

    mkdir function and errno

    Hi everyone!
    Here is a silly question!

    The mkdir function:
    int mkdir (const char *filename, mode_t mode)

    has the following errnos:
    EACCES, EEXIST, EMLINK, etc....

    How can I find which one...
  24. Replies
    11
    Views
    5,183

    Correct - I meant the 2 to the power of m and not...

    Correct - I meant the 2 to the power of m and not XOR
  25. Replies
    11
    Views
    5,183

    Oh yes - this is the not the XOR operator, it is...

    Oh yes - this is the not the XOR operator, it is the 2 to the power of m
Results 1 to 25 of 28
Page 1 of 2 1 2