This site is no longer active and is available for archival purposes only. Registration and login is disabled.

request sending


request sending

Postby coolkc » Jul 17, 2007 @ 10:57am

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
coolkc
pm Member
 
Posts: 25
Joined: Jun 5, 2007 @ 4:59pm


Postby edge » Jul 18, 2007 @ 10:50am

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby coolkc » Jul 18, 2007 @ 1:17pm

coolkc
pm Member
 
Posts: 25
Joined: Jun 5, 2007 @ 4:59pm


Postby edge » Jul 20, 2007 @ 9:41am

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby coolkc » Jul 20, 2007 @ 11:42am

coolkc
pm Member
 
Posts: 25
Joined: Jun 5, 2007 @ 4:59pm


Postby coolkc » Jul 20, 2007 @ 2:13pm

coolkc
pm Member
 
Posts: 25
Joined: Jun 5, 2007 @ 4:59pm


Postby edge » Jul 20, 2007 @ 3:52pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby coolkc » Jul 23, 2007 @ 11:56am

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
coolkc
pm Member
 
Posts: 25
Joined: Jun 5, 2007 @ 4:59pm


Postby edge » Jul 23, 2007 @ 2:19pm

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
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby coolkc » Jul 24, 2007 @ 12:11pm

coolkc
pm Member
 
Posts: 25
Joined: Jun 5, 2007 @ 4:59pm


Postby edge » Jul 25, 2007 @ 3:15pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron