gochat

package module
v0.0.0-...-d682030 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2017 License: GPL-2.0 Imports: 3 Imported by: 0

README

gochat

Introduction

Gochat is a small IRC-like chat client and server in Go, for practice only. Multiple clients connect to a single server and can chat in a unique channel.

It uses protobuf to serialize the messages.

Installation

Use go get, or clone the repository and install gochatclient and gochatserver separately with go install.

Both gochatserver and gochatclient accept host and port command line variables, for example: gochaclient -host localhost -port 8081.

Dependencies

Only Go is required. The compiled source protobuf file is already included in project.

TODO list

  • Client reconnection in case of connection loss

Documentation

Overview

Package gochat is a generated protocol buffer package.

It is generated from these files:

chatmessage.proto

It has these top-level messages:

ChatMessage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatMessage

type ChatMessage struct {
	Sender           *string `protobuf:"bytes,1,req,name=sender" json:"sender,omitempty"`
	SendTime         *uint64 `protobuf:"varint,2,req,name=send_time" json:"send_time,omitempty"`
	Content          *string `protobuf:"bytes,3,req,name=content" json:"content,omitempty"`
	Target           *string `protobuf:"bytes,4,opt,name=target" json:"target,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

func (*ChatMessage) GetContent

func (m *ChatMessage) GetContent() string

func (*ChatMessage) GetSendTime

func (m *ChatMessage) GetSendTime() uint64

func (*ChatMessage) GetSender

func (m *ChatMessage) GetSender() string

func (*ChatMessage) GetTarget

func (m *ChatMessage) GetTarget() string

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) Reset

func (m *ChatMessage) Reset()

func (*ChatMessage) String

func (m *ChatMessage) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL