Page 4 of 8 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 80

Thread: Socket problem

  1. #31
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    http isnt a network protocl its an application protocol..

    ive already explained the difference between tcp and udp, ICMP has a lower priority and gets tagged differently.

    http would not be a good protocol for a talker app. if you actually watched what goes behind http it has a very different structure to what you're trying to achieve, and the overhead would be very considerable. Its not impossible, in fact its very possible, but, at the end of it, theres a lot of overhead in the http protocol to send 1 off lines of text as a talker app.

    an IRC style protocol is a good one where you send commands in specific formats, and get an OK/Fail response over TCP, that ensures the msg was sent, and allows for checking of connection issues etc.

    PS of course if you've run through my tutorial and tried the http app I suggest you'll know exactly how that works.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  2. #32
    Join Date
    Aug 2007
    Posts
    198
    Flash app has changed to TCP, unfortunatly, it still is not working.

  3. #33
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    Well, now you need to look at what you're sending from the sender, and receiving from the receiver.. You've not posted any findings of debuggins, does it connect? if not, whats the error, if its connecting you're sending data, what does flash see? what exactly did you send it??
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  4. #34
    Join Date
    Aug 2007
    Posts
    198
    Sorry Liz, my mistake.

    I can use the TCP protocol, but not with sockets. I can only use UDP with sockets. The API used doesn't support TCP sockets, despite it being requested 3 years ago.

    I'll try to fix it.
    Thanks a lot for your help.

    P.S.: Do you know where I can find delphi 6 update (2 I think) (for running indy) without registring my product?

  5. #35
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    Unfortunately no, the delphi 6 updates are for registered delphi 6 users only, just click on the downloads, delphi, registered users - you would have to register of course. It might depend on why you cant register, if you've run out of available registrations you can get them bumped.

    Actually as indy comes as source you should be able to install..
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  6. #36
    Join Date
    Aug 2007
    Posts
    198
    I able to install indy and run delphi but you can't compile if you haven't install the update 2.

  7. #37
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    ooh bummer. if you wanna PM me on this, I can try approaching nick about getting you the update.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

  8. #38
    Join Date
    Aug 2007
    Posts
    198
    Ok, now I have turbo delphi.
    Problem, I got the UDP socket now but what code?

    Here my code for the TCP:

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    ClientSocket1.Port := 4000;
    //local TCP/IP address of the server
    ClientSocket1.Host := '127.0.0.1'; // 127.0.0.1
    ClientSocket1.Active := true;
    end;

    procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
    begin
    ClientSocket1.Active := false;
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    if ClientSocket1.Active then
    ClientSocket1.Socket.SendText(Edit1.Text);

    end;

  9. #39
    Join Date
    Aug 2007
    Posts
    198
    Ok so apparently somebody thinks I'm just waiting for the answer and doing nothing myself.

    I tried to find an aswer and entered
    UdpSocket1.Active:=True
    UdpSocket1.Send

    I had the possibilities

    SendTo
    SendBuf
    Sendln
    SendStream

    but I have no idea what to put between the brackets (yes they tell you what type it must be but I don't unsderstand it).

    Help me, please.

  10. #40
    Join Date
    Nov 2006
    Location
    UK
    Posts
    3,774
    Well your choice of the middle 2 is up to you, take a quick read on the helpfile as to which suits you best.
    Delphi !ROCKS!
    Got a question? Read this first!!!
    "You gotta help us, Doc. We've tried nothin' and we're all out of ideas"

Page 4 of 8 FirstFirst ... 23456 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •