Are you using a PC or is this for an embedded device?
If you're running Windows, take a look at this MSDN article: Serial Communications in Windows
Once you have retrieved your buffer, you can write over TCP/IP or UDP (Lots of tutorials for this available, depending on how you want to do this).
If you need to do this on an embedded device, there are adapters available for purchase, though you can probably roll your own with something like a Netburner system (It'll be more expensive, but you have control over the functionality).