Page 1 of 1

request sending

PostPosted: Jul 17, 2007 @ 10:57am
by coolkc
Hi,
I want to see how the socket is being formed and how is the connection is being set(like it happens in C Socket programming). I mean first the server waits for a connection and when a client wants a connection, the connection is set. Then the client sends a request and the server implements that request.

How to implement these sequence of steps in Edge. I already wrote a sample code in C in the topic "TCP Protocols" . I followed all the steps suggested by you and the program is compiling and linking well. But when I run the executable, simply a window appears with black screen. Can you suggest a way to display messages at each step and a way to know whether the connection has been set??

Also please tell me how to send requests from client to server like, for example client may send a string and ask the server to print it (similar to the C program that i pasted in topic "TCP Protocols"). Can you help me how to implement these steps in Edge both for Windows desktop and Symbian???

Hoping for a reply soon.

Thank you
coolkc

PostPosted: Jul 18, 2007 @ 10:50am
by edge

PostPosted: Jul 18, 2007 @ 1:17pm
by coolkc

PostPosted: Jul 20, 2007 @ 9:41am
by edge
Hi Coolkc,

First I recommend checking the return value of your Connect() function (does it return true or false?). Move ENET_RUNNINGSERVER to your server code (instead of your client code).

When these events happen, use ClassEConsole :: MsgWindow() to show a message box. Do you get any events? If not, it could also be a problem with connecting to localhost. Try connecting to a website instead.

PostPosted: Jul 20, 2007 @ 11:42am
by coolkc

PostPosted: Jul 20, 2007 @ 2:13pm
by coolkc

PostPosted: Jul 20, 2007 @ 3:52pm
by edge

PostPosted: Jul 23, 2007 @ 11:56am
by coolkc
Hi,

Thank you for the reply.

There is one 3ds model by name edgelogo in this server:
http://130.192.163.84:8080/edgelib/edgelogo.3ds

and I want to download this model from that server into my PC whose IP is 130.192.163.89

How to download this model from that server into my PC (which is the client)?? First the client should request for that model and then the server should send that model to that client. How to make such requests??

I am trying to use this command:
display->CreateSurface(&edgelogo, "http://130.192.163.84:8080/edgelib/edgelogo.3ds", -3)

But I am not knowing how to specify the memsize and I am also not sure whether we can specify the mem pointer like the way I did. Can you please help me with this??

Hoping to get a reply soon.

Thank you
coolkc

PostPosted: Jul 23, 2007 @ 2:19pm
by edge
Hi Coolkc,

Unfortunately, you can't specify an URL to the CreateSurface() function. You need to download it manually. We also recommend saving it on the device after downloading to save bandwidth.

To download a file using TCP/IP you can call ClassEConnect :: SendHTTPGet() with your URL as a parameter. After connecting to the server you should get ENET_RECEIVEDATA events with the file data. Use EHTTPStack to receive the data. More information on EHTTPStack is available here: http://www.edgelib.com/index.php?node=282

PostPosted: Jul 24, 2007 @ 12:11pm
by coolkc

PostPosted: Jul 25, 2007 @ 3:15pm
by edge