greenteaworks
v0.92.0
Published
a node.js plugin to integrate nw.js/electron games with steamworks with p2p
Downloads
0
Readme
GreenTeaWorks
clone from greenworks.js
version number sync as nw.js
added types for typescript
added p2p function:
acceptP2PSessionWithUser(steamId: string): void
isP2PPacketAvailable(nChannel?:number): number
sendP2PPacket(steamId: string, sendType: eP2PSendType, data: Buffer): boolean
readP2PPacket(size: number,nChannel?:number):{data: Buffer,steamIDRemote: string}
added enum
eP2PSendType
const enum eP2PSendType { Unreliable = 0, UnreliableNoDelay = 1, Reliable = 2, ReliableWithBuffering = 3 }
added matching function
requestLobbyList()
added Event:
SteamEvent.LobbyMatchList
callback:(LobbiesMatching: number) => void
(after calledrequestLobbyList
)SteamEvent.P2PSessionRequest
callback:(steamIDRemote: string) => void
(after other player calledacceptP2PSessionWithUser
)SteamEvent.P2PSessionConnectFail
callback:(steamIDRemote: string,eP2PSessionError:number) => void
(after connected player quit)