Kermit- dialup and network connection

hi all,
Using kermit, i made serial dialup connetion between two PCs through telephone line and transfered files trough this line. The code appears as like this,

set modem type generic #Setting the modem type.
set modem data-compression on #Data compression on to speed up transfer.
set line /dev/ttyS0 #Modem is connected to COM1 which is in /dev/ttyS0.
set flow rts/cts #Setting the flow control to rts/cts.
take /usr/local/App/Out/ #opening file
set dial method tone #Tone dialing.
set dial ignore-dialtone on #Don't wait for dial tone (only for D-Link modems).
clear device-and-input #Clearing the device buffers.
set file collision discard #If the same file is received again, discard it.

And now I need to change this code for network connection. (As the telephone line connection is to be replaced with MAN)
Is it possible to migrate code from dialup to network connection?
Can I use socket programming for achieve this?
Is there any other protocol to transfer a file through leased line in linux platform?

Expecting a detailed favourable reply,
Thanks & rgds,
PC Saji