Have you looked at using Indy on both Win32 and Linux? I believe there is also a project to get it to work with Free Pascal.