MCPcopy Create free account

hub / github.com/cmu440/p1 / functions

Functions159 in github.com/cmu440/p1

↓ 18 callersFunctionmakeParams
(epochLimit, epochMillis, windowSize int)
src/github.com/cmu440/lsp/lsp1_test.go:193
↓ 18 callersFunctionnewTestSystem
(t *testing.T, numClients int, params *Params)
src/github.com/cmu440/lsp/lsp1_test.go:58
↓ 18 callersMethodrunTest
(timeout int)
src/github.com/cmu440/lsp/lsp1_test.go:162
↓ 18 callersMethodsetDescription
(desc string)
src/github.com/cmu440/lsp/lsp1_test.go:48
↓ 18 callersMethodsetNumMsgs
(n int)
src/github.com/cmu440/lsp/lsp1_test.go:43
↓ 12 callersFunctionnewSyncTestSystem
(t *testing.T, numClients, numMsgs int, mode syncTestMode, params *Params)
src/github.com/cmu440/lsp/lsp4_test.go:56
↓ 12 callersMethodrunTest
()
src/github.com/cmu440/lsp/lsp4_test.go:96
↓ 12 callersMethodsetDescription
(desc string)
src/github.com/cmu440/lsp/lsp4_test.go:86
↓ 12 callersMethodsetMaxEpochs
(maxEpochs int)
src/github.com/cmu440/lsp/lsp4_test.go:91
↓ 11 callersMethodRead
Read reads a data message from a client and returns its payload, and the connection ID associated with the client that sent the message. This method s
src/github.com/cmu440/lsp/server_api.go:17
↓ 11 callersMethodWrite
Write sends a data message to the client with the specified connection ID. This method should NOT block, and should return a non-nil error if the conn
src/github.com/cmu440/lsp/server_api.go:22
↓ 10 callersMethodClose
Close terminates all currently connected clients and shuts down the LSP server. This method should block until all pending messages for each client ar
src/github.com/cmu440/lsp/server_api.go:38
↓ 8 callersMethodConnID
ConnID returns the connection ID associated with this client.
src/github.com/cmu440/lsp/client_api.go:8
↓ 8 callersFunctionnewCloseTestSystem
(t *testing.T, mode closeTestMode)
src/github.com/cmu440/lsp/lsp3_test.go:56
↓ 8 callersMethodrunTest
()
src/github.com/cmu440/lsp/lsp3_test.go:94
↓ 8 callersMethodsetDescription
(t string)
src/github.com/cmu440/lsp/lsp3_test.go:75
↓ 8 callersMethodsetMaxEpochs
(maxEpochs int)
src/github.com/cmu440/lsp/lsp3_test.go:80
↓ 8 callersMethodsetNumClients
(numClients int)
src/github.com/cmu440/lsp/lsp3_test.go:69
↓ 8 callersMethodsetParams
(epochLimit, epochMillis, windowSize int)
src/github.com/cmu440/lsp/lsp3_test.go:85
↓ 7 callersMethodwaitForClients
()
src/github.com/cmu440/lsp/lsp2_test.go:258
↓ 7 callersMethodwaitForServer
()
src/github.com/cmu440/lsp/lsp2_test.go:243
↓ 6 callersFunctionnewWindowTestSystem
(t *testing.T, mode windowTestMode, numClients, numMsgs int, params *Params)
src/github.com/cmu440/lsp/lsp2_test.go:53
↓ 6 callersMethodrunTest
()
src/github.com/cmu440/lsp/lsp2_test.go:317
↓ 6 callersMethodsetDescription
(desc string)
src/github.com/cmu440/lsp/lsp2_test.go:118
↓ 6 callersMethodsetDropPercent
(p int)
src/github.com/cmu440/lsp/lsp1_test.go:53
↓ 6 callersMethodsetMaxEpochs
(maxEpochs int)
src/github.com/cmu440/lsp/lsp2_test.go:123
↓ 5 callersMethodtoggleNetwork
Toggle the network and wait until sends back a notification that it is done. Called from the master's goroutine.
src/github.com/cmu440/lsp/lsp4_test.go:365
↓ 5 callersMethodwaitForClients
Wait until we receive a notification from all clients (or timeout). Called from the master's goroutine.
src/github.com/cmu440/lsp/lsp4_test.go:346
↓ 5 callersMethodwaitForServer
Wait until we receive a notification from the server (or timeout). Called from the master's goroutine.
src/github.com/cmu440/lsp/lsp4_test.go:329
↓ 4 callersFunctionNewClient
NewClient creates, initiates, and returns a new client. This function should return after a connection with the server has been established (i.e., the
src/github.com/cmu440/lsp/client_impl.go:21
↓ 4 callersFunctionNewServer
NewServer creates, initiates, and returns a new server. This function should NOT block. Instead, it should spawn one or more goroutines (to handle thi
src/github.com/cmu440/lsp/server_impl.go:17
↓ 4 callersMethodsetClientWriteDropPercent
(percent int)
src/github.com/cmu440/lsp/lsp2_test.go:105
↓ 4 callersMethodsetMaxSleepMillis
(ms int)
src/github.com/cmu440/lsp/lsp1_test.go:38
↓ 4 callersMethodsetServerWriteDropPercent
(percent int)
src/github.com/cmu440/lsp/lsp2_test.go:100
↓ 4 callersMethodsignalClients
Send signal to all clients. Called from the master's goroutine.
src/github.com/cmu440/lsp/lsp4_test.go:320
↓ 4 callersMethodsignalServer
Send signal to server. Called from the master's goroutine.
src/github.com/cmu440/lsp/lsp4_test.go:314
↓ 4 callersMethodtoNet
()
src/github.com/cmu440/lspnet/addr.go:12
↓ 3 callersMethodcheckClientReadMsgs
(sentMsgs []string)
src/github.com/cmu440/lsp/lsp2_test.go:296
↓ 3 callersMethodcheckServerReadMsgs
(sentMsgs []string)
src/github.com/cmu440/lsp/lsp2_test.go:275
↓ 3 callersFunctiondropIt
(dropPercent int)
src/github.com/cmu440/lspnet/conn.go:115
↓ 3 callersFunctionisLoggingEnabled
()
src/github.com/cmu440/lspnet/conn.go:22
↓ 3 callersMethodstreamToClient
Server sends a stream of messages to a client.
src/github.com/cmu440/lsp/lsp2_test.go:150
↓ 3 callersMethodstreamToServer
Client sends a stream of messages to the server.
src/github.com/cmu440/lsp/lsp2_test.go:130
↓ 2 callersMethodCloseConn
CloseConn terminates the client with the specified connection ID, returning a non-nil error if the specified connection ID does not exist. All pending
src/github.com/cmu440/lsp/server_api.go:28
↓ 2 callersMethodmakeRandMsgs
(numMsgs int)
src/github.com/cmu440/lsp/lsp2_test.go:110
↓ 2 callersFunctionreadDropPercent
(c *UDPConn)
src/github.com/cmu440/lspnet/staff.go:60
↓ 2 callersMethodreadFromAllClients
Server reads a stream of messages from all currently connected clients.
src/github.com/cmu440/lsp/lsp2_test.go:208
↓ 2 callersMethodreadFromServer
Client reads a stream of messages from the server.
src/github.com/cmu440/lsp/lsp2_test.go:170
↓ 2 callersMethodwrite
(b []byte, addr *UDPAddr)
src/github.com/cmu440/lspnet/conn.go:86
↓ 1 callersMethodClose
Close terminates the client's connection with the server. It should block until all pending messages to the server have been sent and acknowledged. On
src/github.com/cmu440/lsp/client_api.go:29
↓ 1 callersMethodRead
Read reads a data message from the server and returns its payload. This method should block until data has been received from the server and is ready
src/github.com/cmu440/lsp/client_api.go:16
↓ 1 callersFunctionSetClientReadDropPercent
SetClientReadDropPercent sets the read drop percent for clients.
src/github.com/cmu440/lspnet/staff.go:27
↓ 1 callersFunctionSetClientWriteDropPercent
SetClientWriteDropPercent sets the write drop percent for clients.
src/github.com/cmu440/lspnet/staff.go:34
↓ 1 callersFunctionSetReadDropPercent
SetReadDropPercent sets the read drop percent for both clients and servers.
src/github.com/cmu440/lspnet/staff.go:15
↓ 1 callersFunctionSetServerReadDropPercent
SetServerReadDropPercent sets the read drop percent for servers.
src/github.com/cmu440/lspnet/staff.go:41
↓ 1 callersFunctionSetServerWriteDropPercent
SetServerWriteDropPercent sets the write drop percent for servers.
src/github.com/cmu440/lspnet/staff.go:48
↓ 1 callersFunctionSetWriteDropPercent
SetWriteDropPercent sets the write drop percent for clients and servers.
src/github.com/cmu440/lspnet/staff.go:21
↓ 1 callersMethodString
String returns a string representation of this params. To pretty-print a params, you can pass it to a format string like so: params := NewParams() fmt
src/github.com/cmu440/lsp/params.go:41
↓ 1 callersMethodWrite
Write sends a data message with the specified payload to the server. This method should NOT block, and should return a non-nil error if the connection
src/github.com/cmu440/lsp/client_api.go:21
↓ 1 callersMethodWriteToUDP
WriteToUDP writes a UDP packet to addr via c, copying the payload from b.
src/github.com/cmu440/lspnet/conn.go:79
↓ 1 callersMethodbuildClient
Create client. Have it generate messages and check that they are echoed.
src/github.com/cmu440/lsp/lsp3_test.go:253
↓ 1 callersMethodbuildServer
()
src/github.com/cmu440/lsp/lsp3_test.go:175
↓ 1 callersMethodcreateClient
(index int)
src/github.com/cmu440/lsp/lsp3_test.go:169
↓ 1 callersMethodcreateServer
()
src/github.com/cmu440/lsp/lsp3_test.go:163
↓ 1 callersMethodmaster
Master method to coordinate the test.
src/github.com/cmu440/lsp/lsp4_test.go:380
↓ 1 callersMethodrandSleep
()
src/github.com/cmu440/lsp/lsp1_test.go:115
↓ 1 callersFunctionrunClient
(cli lsp.Client)
src/github.com/cmu440/crunner/crunner.go:56
↓ 1 callersMethodrunClient
Runs a simple echo server and tests whether messages are correctly sent and received. Some tests introduce up to 20% packet loss, random delays, multi
src/github.com/cmu440/lsp/lsp1_test.go:124
↓ 1 callersMethodrunClient
Create and runs a client. Runs in a background goroutine. Called once per client at the very beginning of a test.
src/github.com/cmu440/lsp/lsp4_test.go:241
↓ 1 callersMethodrunMaxCapacityTest
()
src/github.com/cmu440/lsp/lsp2_test.go:330
↓ 1 callersMethodrunNetwork
Alternates between turning network writes on and off in a loop. Runs in a background goroutine and is started once at the very beginning of a test.
src/github.com/cmu440/lsp/lsp4_test.go:113
↓ 1 callersMethodrunScatteredMsgsTest
()
src/github.com/cmu440/lsp/lsp2_test.go:397
↓ 1 callersFunctionrunServer
(srv lsp.Server)
src/github.com/cmu440/srunner/srunner.go:54
↓ 1 callersMethodrunServer
runServer sets up the server and reads/echos messages back to clients.
src/github.com/cmu440/lsp/lsp1_test.go:95
↓ 1 callersMethodrunServer
Create and runs the server. Runs in a background goroutine and is started once at the very beginning of a test.
src/github.com/cmu440/lsp/lsp4_test.go:143
↓ 1 callersFunctionwriteDropPercent
(c *UDPConn)
src/github.com/cmu440/lspnet/staff.go:72
MethodClose
()
src/github.com/cmu440/lsp/client_impl.go:39
MethodClose
()
src/github.com/cmu440/lsp/server_impl.go:35
MethodClose
Close closes the connection.
src/github.com/cmu440/lspnet/conn.go:105
MethodCloseConn
(connID int)
src/github.com/cmu440/lsp/server_impl.go:31
MethodConnID
()
src/github.com/cmu440/lsp/client_impl.go:25
FunctionDialUDP
DialUDP behaves the same as the net.DialUDP method (with some additional book-keeping). Clients should use this method to connect to the server.
src/github.com/cmu440/lspnet/net.go:58
FunctionEnableDebugLogs
EnableDebugLogs has log messages directed to standard output if enable is true.
src/github.com/cmu440/lspnet/conn.go:14
FunctionHash
Hash concatentates a message and a nonce and generates a hash value. Only miners should ever need to call this method.
src/github.com/cmu440/bitcoin/hash.go:11
FunctionJoinHostPort
JoinHostPort behaves the same as the net.JoinHostPort function.
src/github.com/cmu440/lspnet/net.go:79
FunctionListenUDP
ListenUDP behaves the same as the net.ListenUDP method (with some additional book-keeping). Servers should use this method to begin listening for inc
src/github.com/cmu440/lspnet/net.go:37
FunctionNewAck
NewAck returns a new acknowledgement message with the specified connection ID and sequence number.
src/github.com/cmu440/lsp/message.go:42
FunctionNewConnect
NewConnect returns a new connect message.
src/github.com/cmu440/lsp/message.go:25
FunctionNewData
NewData returns a new data message with the specified connection ID, sequence number, and payload.
src/github.com/cmu440/lsp/message.go:31
FunctionNewJoin
NewJoin creates a join message. Miners send join messages to the server.
src/github.com/cmu440/bitcoin/message.go:45
FunctionNewParams
NewParams returns a Params with default field values.
src/github.com/cmu440/lsp/params.go:29
FunctionNewRequest
NewRequest creates a request message. Clients send request messages to the server and the server sends request messages to miners.
src/github.com/cmu440/bitcoin/message.go:25
FunctionNewResult
New result creates a result message. Miners send result messages to the server and the server sends result messages to clients.
src/github.com/cmu440/bitcoin/message.go:36
MethodRead
()
src/github.com/cmu440/lsp/client_impl.go:29
MethodRead
()
src/github.com/cmu440/lsp/server_impl.go:21
MethodRead
Read implements the Conn Read method.
src/github.com/cmu440/lspnet/conn.go:34
MethodReadFromUDP
ReadFromUDP reads a UDP packet from c, copying the payload into b. It returns the number of bytes copied into b and the return address that was on the
src/github.com/cmu440/lspnet/conn.go:53
FunctionResetDropPercent
ResetDropPercent resets all drop percents to 0.
src/github.com/cmu440/lspnet/staff.go:55
FunctionResolveUDPAddr
ResolveUDPAddr behaves the same as the net.UDPAddr.ResolveUDPAddr method (with some additional book-keeping).
src/github.com/cmu440/lspnet/net.go:24
FunctionSplitHostPort
SplitHostPort behaves the same as the net.SplitHostPort function.
src/github.com/cmu440/lspnet/net.go:84
next →1–100 of 159, ranked by callers