Thanks for the info, but I still need more clarity and info, can anyone 
provide some examples regarding my issues.

Cheers,
Mohammad

"Luis Cordova" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
vide infra
(hole it helps)

On 4/16/06, Mohammad Afshari <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have some questions regarding sending data over a network..
>
> I know that if you want to send & recieve data you should follow the
> procedure below:
>
> 1- Retrieve Net Library refrence
> 2- Open the Net Library
> 3- Get or retrieve the IP address of the destination
> 4- Get the service port
> 5- Open a socket
> 6- Connect the socket
> 7- Send & Recieve data
> 8- Disconnetc Socket
> 9- Close Socket
> 10- Close Library
>
>
> Now whats I want to do is, when the user goes into my application, the
> program opens the netlibrary... then retrieves the IP address of my host 
> and
> also sets the service port...
>
> My application is going to be written in such a way.. that at certain
> points, the user might click a button and then a connection is required to
> get the data or send some data!!
>
> Now when I open a socket and connect it... and the first data is
> send/recieved, is the socket disconnected and I need to reconnect the
> socket?? or no I need to open another socket in general for the next
> connection?? can someone explain this in detail for me?? when to 
> reconnect,
> or reopen a socket??

the socket will close for instance when there is an error or no data
is being received for a period of time, the connection will be shut
down by the server side in this case. Ideally you should not have to
do this.

>
> My other question is, how to manage or write a code, for a situation which
> we dont know the amount of data to be recieved by our program??

This is the case in most communications. You can set buffers and read
them in a loop until you get all the data the server is supposed to
send you.

>
> my last question is, in my program,sometimes I get an error from
> NetLibReceive and NetLibSend which the error code is 4625..what does that
> mean?

You can transform it using the StrIToA or something similar and see if
it matches the error codes indicated on the 68K documentation listed
under the NetLib respective function.
>
> an intro to header inclusion in the NetLibSend will be something which I
> need as well..
>
>
> Many Thanx in advance
>
>
>
> --
> For information on using the PalmSource Developer Forums, or to 
> unsubscribe, please see http://www.palmos.com/dev/support/forums/
>


--
-------------------------------------------------------



-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to