Search:

Type: Posts; User: mushy

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    3,603

    further info, on annoying bug This function...

    further info, on annoying bug

    This function works and creates the socket ok and connects



    int connects(char *server, char *port){

    struct addrinfo hints, *res;
    int sock;
  2. Replies
    1
    Views
    3,603

    problem with ipv6 sockets on bind

    This function errors on bind, i havent updated my setup in a while is it possible using a ipv6 setup wont work on my computer?

    Socket operation on non-socket: Error Bind




    int...
  3. Replies
    23
    Views
    15,652

    lol. You need to get out more if that has annoyed...

    lol. You need to get out more if that has annoyed you.
  4. Replies
    23
    Views
    15,652

    I found this thread, i had forgot about it. I...

    I found this thread, i had forgot about it. I started two similar theads the other day on this same topic as i was off holidaying for a couple of months and am trying to get my head round it again. ...
  5. umm i see now. Makeconnection creates a socket....

    umm i see now. Makeconnection creates a socket. Can i get it to return the socket or will that not work. I.e int s =makeconnection. Then just have make connection return int sock?
  6. Replies
    7
    Views
    3,005

    thanks. I started a new thead on it, i got it...

    thanks. I started a new thead on it, i got it compiled. I just get frustrated because ive tried to transfer a file in c sockets for ages and can never do it. I even bought a book linux socket...
  7. Packet Recieved -1 Bytes Bad file descriptor:...

    Packet Recieved -1 Bytes
    Bad file descriptor: Error recieving data

    then program exits, thats the client side anyway.

    Sendfile part sends 107 packets which seems to work to a degree though...
  8. Last thread locked, but still need help. c sockets

    This now compiles but gives errors when i try to transfer the files, i don't know why. I think it might be because im passing the socket to the function and its causing errors. If this is the case i...
  9. Replies
    7
    Views
    3,005

    wow thanks, what a kind reply. Im sorry i annoyed...

    wow thanks, what a kind reply. Im sorry i annoyed you with my silly questions. I must learn not to waste such important peoples time. Out of us two its really clear im the dick here.
  10. Replies
    7
    Views
    3,005

    Errors in my c socket program

    Hey a while ago i started writing a c program to learn, i wanted to send a file using sockets. I have just come back from a 6 month holiday and am struggling to understand what i was doing. I kind of...
  11. Replies
    4
    Views
    1,046

    is it still coming across in binary if i wanted...

    is it still coming across in binary if i wanted to transfer something meaningfull like a picture or a compiled file would this method of transfer work?
  12. Replies
    4
    Views
    1,046

    ah ok thanks i understand now.

    ah ok thanks i understand now.
  13. Replies
    4
    Views
    1,046

    a few questions about this file i/o program

    i wrote this and it compiles with no errors or warnings. Works too, but having some small problems.

    1) It segfaults at the very end after executing the last printf and calling fclose.
    2) It...
  14. Thread: argv[]

    by mushy
    Replies
    13
    Views
    2,093

    cmd: program_name 63 14 18 hello i am a string ...

    cmd: program_name 63 14 18 hello i am a string



    int main (int argc, char *argv[]){

    int num = atoi(argv[1]);
    printf("%d",num);
    return 0;
    }
  15. Replies
    4
    Views
    1,210

    im stupid... lol thanks again for your help i...

    im stupid... lol thanks again for your help i appreciate it.
  16. Replies
    4
    Views
    1,210

    thanks for the info mk. Hey my other thread...

    thanks for the info mk.

    Hey my other thread the code is quite long, i have simplified it here wondering if you can have a look, its very basic. I cant work out what the problem is though

    i...
  17. Replies
    4
    Views
    1,210

    how do firewalls work ? c socket question

    my whole motivation for c programming is because i want to be able to make handy things like netcat and nmap etc .. im really not trying to be a hacker or anything gay like that. I just find that...
  18. Replies
    23
    Views
    15,652

    the makeaddress function has an option to make a...

    the makeaddress function has an option to make a udp socket, but it doesnt. As you can see i pass the string TCP to the makeaddress function to specify that i want to create a tcp socket which is...
  19. Replies
    23
    Views
    15,652

    i had a go using what i thought was a good way of...

    i had a go using what i thought was a good way of doing it, obviously im a noob and im crap - needless to say this isnt working, ive put comments down at the bottom of the code where it seems to be...
  20. Replies
    23
    Views
    15,652

    sending a file across sockets.

    i'm struggling with this.

    Firstly, is it best to open the file in rb and send it across in binary?

    Secondly, what way would i work it do i loop and read chunks for the file at a time and then...
  21. i am guessing but i would assume that because you...

    i am guessing but i would assume that because you didnt include
    {}
    That the while loop is just executing one line i.e the i++ the s=s+3 isnt in the loop and only gets called once the loop has...
  22. Replies
    14
    Views
    2,356

    yea mk i got the port number working it picks a...

    yea mk i got the port number working it picks a random port which is what i wanted. Thanks for your help. I kinda understand it a bit better now. I feel like im starting to grasp it. Cheers.
  23. Replies
    14
    Views
    2,356

    ok guys thanks for your help finally got it work....

    ok guys thanks for your help finally got it work. appreciate it.

    Something im confused about though, i didnt realise i had done it and dont understand why it works.

    struct sockaddr_in *ad =...
  24. Replies
    14
    Views
    2,356

    ok i now have this Im confused about the bind...

    ok i now have this

    Im confused about the bind command im getting the same error as you, i pass addr but i declare ad

    struct sockaddr_in *ad = (struct sockaddr_in *)addr;

    and use ad-> to...
  25. Replies
    14
    Views
    2,356

    so let me get this right... if i pass an...

    so let me get this right...

    if i pass an address to a function

    say int name (char *name)

    in the function name if i want to change the value of name outside the function i do *name =...
Results 1 to 25 of 79
Page 1 of 4 1 2 3 4