I'm not very familiar with this MacTCP wrapper library you're using, but it looks like the way you create a listening socket instead of connecting to another machine is with NewPassiveConnection, and then the C_Established event will be when a client connects.
For the file access, you might look at using FSpOpenDF to open the file's data fork, FSRead to read the data, then FSClose.
For the file access, you might look at using FSpOpenDF to open the file's data fork, FSRead to read the data, then FSClose.