diff --git a/net.go b/net.go index 8f45eff..177b626 100644 --- a/net.go +++ b/net.go @@ -25,6 +25,12 @@ import ( "os" ) +// Contains a raw json response, not marshalled yet. +type RawResponse struct { + PayloadType int + Payload []byte +} + // Connect to unix domain ipc socket. func (ipc *I3ipc) Connect() error { if !fileExists(ipc.SocketFile) { @@ -75,11 +81,6 @@ func (ipc *I3ipc) sendPayload(payload []byte) error { return nil } -type RawResponse struct { - PayloadType int - Payload []byte -} - func (ipc *I3ipc) readResponse() (*RawResponse, error) { // read header buf := make([]byte, IPC_HEADER_SIZE)