[gnet] A couple of questions about GServer and GConn etc.



Hello!
First, please CC me since i am not realy sure if 
i did subscribe to this list. I'l check if i am subscribed later today
when i connect to my ISP.

I am trying to use GServer and GConn to do some simple communication in
my testprogram.

In gnet_server_new(...) i have the serverfunction that will 
communicate with the client. Is this the correct way to do it?

I have not that much experience of doing network-programming so i am not
sure this is the correct way.


In my testprogram i also created the client that will connect to my
server when it is created.
In gnet_conn_new(..) i have my clientfunction that will communicate with
the client, is this the correct way?

In my serverfunction i can check the status and get the IP from the
client so the testprogram workes as it should.

The thing is that i am not 100% sure of how to write and read from/to
the client/server.

Should i just use the 'gnet_conn_write()' and gnet_conn_read()' in the
serverfunction and the clientfunction?
The 'gnet_conn_read' function needs a new kind of function in its
arguments. What is this function doing? Should i use the
'gnet_conn_readline()' instead?

A tutorial on tcp/ip programming i found on the internet i learned that
usually you need to accept() a connection on a socket, do the
serverfunction this automatic?

Sorry for asking stupid questions.. i just want to learn this shit and i
am tiered.
Have a nice day!


-- 
Name:	Kent Nyberg.
Email:	blurk telia com, blurkis bonbon net
ICQ:	145375073




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]