Skip to content

Commit

Permalink
[game] rename function to improve documentation of intent
Browse files Browse the repository at this point in the history
  • Loading branch information
ghthor committed Jul 6, 2016
1 parent 2932521 commit d907c46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion game/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ func NewPreLoginConn(conn Conn, ds datastore.Datastore) PreLoginConn {
}
}

func RunServer(loginConn PreLoginConn, actorConnector ActorConnector) error {
func LoginAndConnectActor(loginConn PreLoginConn, actorConnector ActorConnector) error {
loggedInConn, err := loginConn.HandleLogin()
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion game/gobconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func newGobWebsocketHandler(
c := NewPreLoginConn(NewGobConn(ws), ds)

// Blocks until the connection has disconnected
err := RunServer(c, actorConnector)
err := LoginAndConnectActor(c, actorConnector)

if err != nil {
log.Printf("packet handler terminated: %v", err)
Expand Down
4 changes: 2 additions & 2 deletions game/prototest/desc.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func DescribeActorGobConn(c gospec.Context) {
loginConn := game.NewPreLoginConn(game.NewGobConn(conn.nextEndpoint()), ds)

go func() {
exitWithError <- game.RunServer(loginConn,
exitWithError <- game.LoginAndConnectActor(loginConn,
func(dsactor datastore.Actor, stateWriter game.InitialStateWriter) (game.InputReceiver, entity.State) {
actor := &mockActor{
actor: dsactor,
Expand Down Expand Up @@ -295,7 +295,7 @@ func DescribeActorGobConn(c gospec.Context) {
loginConn := game.NewPreLoginConn(game.NewGobConn(conn.nextEndpoint()), ds)

go func() {
exitWithError <- game.RunServer(loginConn, nil)
exitWithError <- game.LoginAndConnectActor(loginConn, nil)
}()
}()

Expand Down

0 comments on commit d907c46

Please sign in to comment.