On server:

socat tcp-l:54321,reuseaddr,fork file:/dev/ttyS0,nonblock,raw,echo=0,waitlock=/var/run/tty

On client:

while true; do socat pty,link=/dev/vttyS0,raw,echo=0,waitslave tcp:192.168.1.1:54321; done

A lot of fun exporting fax-modem serial line of servers geographically far and use a central hylafax server with multiple virtual modems =D