Abstracting game communications with pipes

Posts: 370
Joined: 2002.04
Post: #1
Is it viable (read: fast enough) to use pipes for same-process communication in games? I see this as making network play much easier, because it wouldn't matter whether the player was on the local computer or on a remote one; a file descriptor would point to them either way.

Did you ever wonder why we had to run for shelter when the promise of a brave new world unfurled beneath the clear blue sky?
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #2
Personally, I'd put the abstraction a bit higher... for example, route all your communications through

void SendMessageToPeer(struct Peer *peer, struct Message *message);

That way you can replace the transport layer at will, depending on the peer, without paying any performance penalty for intra-process communications (a simple queue).
Quote this message in a reply
Post Reply