Commit Graph

7 Commits

Author SHA1 Message Date
dk de116e8367
moving package comments into doc.go files (#534) 2020-07-03 18:33:46 -04:00
danhale-git 6367929688
Tidy remote_client_connection.go and resolve lint warnings (#522)
* Added automap.go stub

* Fixed bad error handling

* Handle header error from io.Copy()

* d2client.ClientConnection renamed to ServerConnection

Having two interfaces named ClientConnection in adjacent packages was a point of confusion for me. Renamed the client ClientConnection to ServerConnection since clients connect to servers and servers to clients.

* Fix lint warnings in remote_client_connection.go

* Tidying and lint warnings in remote_client_connection.go

* Switch statement in remote_client_connection.go now has matching blocks.

* RemoteClientConnection.serverListener refactor.

The switch statement is still repetitive but now it's separate. I think we would need generics to make it smaller.

* Receiver name change from l to r.

* Comments and other adjustments.

* Old commits

* Fixed bad error handling

* Cleaned up remote_client_connection.go

* SendPacketToClient removed.
2020-07-02 16:29:28 -04:00
danhale-git c27fb572bc
D2networking resolve lint issues (#497)
* Added automap.go stub

* Handle errors in original AutoMap.txt file

* Completed AutoMapRecord struct and comments

* AutoMap loader implemented

* Update from base repo

* Comments added to d2netpacket and d2netpackettype.

Note, the Overview for d2netpacket is in net_packet.go. It could be placed in a doc.go file but net_packet.go seemed appropriate in this case.

* Comments added to d2server

* client_connection.go missed from previous commit

* Comments added to d2client

* Doc.go added to d2networking and other corrections

* Unused parameter present to satisfy interface, named it '_'

* Unhandled errors and other issues resolved in d2networking.

This commit adds simple error reporting and creates a lot of mess. I will be doing one more pass to tidy things up a bit before I move on.

* Commented out continue on RemoteClientConnection error and implemented stringer in message type

* NetPacketType.String uses map instead of switch.

* Map moved into String method
2020-06-30 20:01:51 -04:00
danhale-git 5ea6ada452
D2networking resolve lint issues (#492)
* Added automap.go stub

* Handle errors in original AutoMap.txt file

* Completed AutoMapRecord struct and comments

* AutoMap loader implemented

* Update from base repo

* Comments added to d2netpacket and d2netpackettype.

Note, the Overview for d2netpacket is in net_packet.go. It could be placed in a doc.go file but net_packet.go seemed appropriate in this case.

* Comments added to d2server

* client_connection.go missed from previous commit

* Comments added to d2client

* Doc.go added to d2networking and other corrections
2020-06-29 17:01:26 -04:00
Stephen Horan 336c6719ee
Connection manager for cleaning up connections (#404)
* Connection manager implementation to disconnect timed out users.

* Connection manager implementation to disconnect timed out users.
2020-06-22 20:31:42 -04:00
Haashi 5e1725dd7d
385/lintissues (#391)
* camera offset for ui panels :

added maprenderer viewport to be aligned left or right

calling alignement on keyPress in game_controls

* check if already aligned

* fix bugs

-forgot to assign alignement
-defaultScreenRect instead of screenRect because of issue mentionned in original comment

* remove config.json and replace go.mod line

* removing duplicate import of d2common

replacing all dh to d2common

* remove useless breaks from switch statement

* better range when value unused + prettying import

* item_affix rewrite

using return values instead of pointer references in arguments

* ebiten deprecated calls

* small fixes
2020-06-22 11:53:44 -04:00
Tim Sarbin 2da08884c4
Added multiplayer support (#336) 2020-06-18 14:11:04 -04:00