MCPcopy Create free account
hub / github.com/ContainerSSH/ContainerSSH / createReply

Method createReply

internal/sshserver/serverImpl.go:1150–1172  ·  view source on GitHub ↗
(request *ssh.Request, logger log.Logger)

Source from the content-addressed store, hash-verified

1148}
1149
1150func (s *serverImpl) createReply(request *ssh.Request, logger log.Logger) func(
1151 success bool,
1152 message string,
1153 reason error,
1154) {
1155 reply := func(success bool, message string, reason error) {
1156 if request.WantReply {
1157 if err := request.Reply(
1158 success,
1159 []byte(message),
1160 ); err != nil {
1161 logger.Debug(
1162 messageCodes.Wrap(
1163 err,
1164 messageCodes.ESSHReplyFailed,
1165 "Failed to send reply to client",
1166 ),
1167 )
1168 }
1169 }
1170 }
1171 return reply
1172}
1173
1174func (s *serverImpl) handleDecodedChannelRequest(
1175 channelMetadata metadata.ChannelMetadata,

Callers 2

handleGlobalRequestMethod · 0.95
handleChannelRequestMethod · 0.95

Calls 1

DebugMethod · 0.65

Tested by

no test coverage detected