how to detect connection

hi

i am developing an application which downloads data from a database(which is on server) to the client.

i want this program start automatically whenever client connects to the internet or a ras server. for this i think a program should run all the times at client detecting connection and when it founds that client has connected to the server it start the application which will download the data to the client

can someone give any idea about how this can be done.

how the connection can be detected.

also i want this whole process should be hidden there should be no taskbar button for these processes.

please tell me how to do this

thanks in advanse

[713 byte] By [parul_patidar] at [2007-9-26 1:15:56]
# 1

You will want to use a ServerSocket to listen, and then accept the connection. If you want this to be a large scale server app, then it should spawn a thread when it receives a connection, and then have the thread do the interaction, so you would have one thread for each client.

To run a piece of java without having it be put in the taskbar, run it with javaw, not just the java command.

GN

statusquo at 2007-6-29 0:43:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

You will want to use a ServerSocket to listen, and then accept the connection. If you want this to be a large scale server app, then it should spawn a thread when it receives a connection, and then have the thread do the interaction, so you would have one thread for each client.

To run a piece of java without having it be put in the taskbar, run it with javaw, not just the java command.

GN

statusquo at 2007-6-29 0:43:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

sir

thanks for the reply ur reply regarding taskbar button was perfect.

perhaps i could not explain my first problem properly

i don't want to use server socket. at server i have MS SQL Server database and i will run a client and connect to sqlserver and insert records in database this is the way i will do uploading of data at server.

now in this application the client will not be connected to internet all the times. whenever client connects to the internet my client program should know that client has connected to the internet or a RAS server and should establish database connection.

so i want to detect internet connection.

waiting for reply

parul_patidar at 2007-6-29 0:43:01 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...