MCPcopy
hub / github.com/ph4ntonn/Stowaway / dispatchUUID

Function dispatchUUID

admin/initial/method.go:16–39  ·  view source on GitHub ↗
(conn net.Conn, secret string)

Source from the content-addressed store, hash-verified

14)
15
16func dispatchUUID(conn net.Conn, secret string) string {
17 var sMessage protocol.Message
18
19 uuid := utils.GenerateUUID()
20 uuidMess := &protocol.UUIDMess{
21 UUIDLen: uint16(len(uuid)),
22 UUID: uuid,
23 }
24
25 header := &protocol.Header{
26 Sender: protocol.ADMIN_UUID,
27 Accepter: protocol.TEMP_UUID,
28 MessageType: protocol.UUID,
29 RouteLen: uint32(len([]byte(protocol.TEMP_ROUTE))),
30 Route: protocol.TEMP_ROUTE,
31 }
32
33 sMessage = protocol.PrepareAndDecideWhichSProtoToLower(conn, secret, protocol.ADMIN_UUID)
34
35 protocol.ConstructMessage(sMessage, header, uuidMess, false)
36 sMessage.SendMessage()
37
38 return uuid
39}
40
41func NormalActive(userOptions *Options, topo *topology.Topology, proxy share.Proxy) net.Conn {
42

Callers 2

NormalActiveFunction · 0.85
NormalPassiveFunction · 0.85

Calls 4

SendMessageMethod · 0.95
GenerateUUIDFunction · 0.92
ConstructMessageFunction · 0.92

Tested by

no test coverage detected