aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/tcp-transport.go
Commit message (Collapse)AuthorAgeFilesLines
* simulation: integrate test.Transport (#99)Mission Liao2018-09-111-32/+90
| | | | | - Add marshaller for simulation by encoding/json - Implement peer server based on test.TranportServer - Remove network models, they are replaced with test.LatencyModel
* test: add transport layer (#97)Mission Liao2018-09-101-0/+568
The purpose of transport layer is to abstract the way to send messages and setup connections between peers in a p2p network. The peer discovery is simulated by a hosted server: every peer sends its address to a known server. Once collecting enough peers, respond the whole peers lists to all peers. Changes: - Add test.Trasnport interface - Add test.Transport implementation by golang channel. - Add test.transport implementation by TCP connection. - Move LatencyModel to core/test package - Add Marshaller interface