aboutsummaryrefslogtreecommitdiff
path: root/docs/data/documentation/swiftgopherclient/gopherclient/sendrequest(to:port:message:completion:).json
blob: 76e19120fe969c2706567b0dee8c813d946dfd8b (plain)
1
{"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"kind":"text","text":" "},{"text":"sendRequest","kind":"identifier"},{"kind":"text","text":"("},{"text":"to","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"host","kind":"internalParam"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"port","kind":"externalParam"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"},{"text":" = 70, ","kind":"text"},{"kind":"externalParam","text":"message"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"kind":"text","text":", "},{"kind":"externalParam","text":"completion"},{"text":": ","kind":"text"},{"text":"@escaping","kind":"keyword"},{"kind":"text","text":" ("},{"kind":"typeIdentifier","text":"Result","preciseIdentifier":"s:s6ResultO"},{"text":"<[","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:13GopherHelpers10gopherItemV","text":"gopherItem"},{"kind":"text","text":"], "},{"text":"Error","preciseIdentifier":"s:s5ErrorP","kind":"typeIdentifier"},{"text":">) -> ","kind":"text"},{"kind":"typeIdentifier","text":"Void","preciseIdentifier":"s:s4Voida"},{"text":")","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The host address of the Gopher server."}]}],"name":"host"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"The port of the Gopher server. Defaults to 70."}]}],"name":"port"},{"name":"message","content":[{"inlineContent":[{"text":"The message to be sent to the server.","type":"text"}],"type":"paragraph"}]},{"name":"completion","content":[{"type":"paragraph","inlineContent":[{"text":"A closure that handles the result of the request.","type":"text"}]}]}]},{"kind":"content","content":[{"type":"heading","level":2,"text":"Discussion","anchor":"discussion"},{"inlineContent":[{"type":"text","text":"The method asynchronously establishes a connection, sends the request, and calls the completion handler with the result."}],"type":"paragraph"}]}],"metadata":{"externalID":"s:17swiftGopherClient0bC0C11sendRequest2to4port7message10completionySS_SiSSys6ResultOySay0B7Helpers10gopherItemVGs5Error_pGctF","roleHeading":"Instance Method","title":"sendRequest(to:port:message:completion:)","modules":[{"name":"swiftGopherClient"}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"text":"sendRequest","kind":"identifier"},{"kind":"text","text":"("},{"text":"to","kind":"externalParam"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"text":"port","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Int","preciseIdentifier":"s:Si","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"message"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"String","preciseIdentifier":"s:SS"},{"text":", ","kind":"text"},{"text":"completion","kind":"externalParam"},{"kind":"text","text":": ("},{"text":"Result","kind":"typeIdentifier","preciseIdentifier":"s:s6ResultO"},{"text":"<[","kind":"text"},{"preciseIdentifier":"s:13GopherHelpers10gopherItemV","text":"gopherItem","kind":"typeIdentifier"},{"text":"], ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s5ErrorP","text":"Error"},{"kind":"text","text":">) -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:s4Voida","text":"Void"},{"text":")","kind":"text"}],"symbolKind":"method","role":"symbol"},"kind":"symbol","sections":[],"abstract":[{"text":"Sends a request to a Gopher server.","type":"text"}],"identifier":{"url":"doc:\/\/swiftGopherClient\/documentation\/swiftGopherClient\/GopherClient\/sendRequest(to:port:message:completion:)","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/swiftgopherclient\/gopherclient\/sendrequest(to:port:message:completion:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/swiftGopherClient\/documentation\/swiftGopherClient","doc:\/\/swiftGopherClient\/documentation\/swiftGopherClient\/GopherClient"]]},"schemaVersion":{"minor":3,"patch":0,"major":0},"references":{"doc://swiftGopherClient/documentation/swiftGopherClient":{"abstract":[],"kind":"symbol","title":"swiftGopherClient","role":"collection","type":"topic","identifier":"doc:\/\/swiftGopherClient\/documentation\/swiftGopherClient","url":"\/documentation\/swiftgopherclient"},"doc://swiftGopherClient/documentation/swiftGopherClient/GopherClient":{"title":"GopherClient","kind":"symbol","url":"\/documentation\/swiftgopherclient\/gopherclient","identifier":"doc:\/\/swiftGopherClient\/documentation\/swiftGopherClient\/GopherClient","abstract":[{"type":"codeVoice","code":"GopherClient"},{"text":" is a class for handling network connections and requests to Gopher servers.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"class","kind":"keyword"},{"kind":"text","text":" "},{"text":"GopherClient","kind":"identifier"}],"navigatorTitle":[{"text":"GopherClient","kind":"identifier"}]},"doc://swiftGopherClient/documentation/swiftGopherClient/GopherClient/sendRequest(to:port:message:completion:)":{"type":"topic","url":"\/documentation\/swiftgopherclient\/gopherclient\/sendrequest(to:port:message:completion:)","title":"sendRequest(to:port:message:completion:)","identifier":"doc:\/\/swiftGopherClient\/documentation\/swiftGopherClient\/GopherClient\/sendRequest(to:port:message:completion:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"sendRequest"},{"kind":"text","text":"("},{"text":"to","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"kind":"text","text":", "},{"kind":"externalParam","text":"port"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"},{"kind":"text","text":", "},{"kind":"externalParam","text":"message"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"completion","kind":"externalParam"},{"text":": (","kind":"text"},{"preciseIdentifier":"s:s6ResultO","text":"Result","kind":"typeIdentifier"},{"kind":"text","text":"<["},{"text":"gopherItem","preciseIdentifier":"s:13GopherHelpers10gopherItemV","kind":"typeIdentifier"},{"text":"], ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:s5ErrorP","text":"Error"},{"kind":"text","text":">) -> "},{"preciseIdentifier":"s:s4Voida","text":"Void","kind":"typeIdentifier"},{"kind":"text","text":")"}],"role":"symbol","kind":"symbol","abstract":[{"text":"Sends a request to a Gopher server.","type":"text"}]}}}