当前位置: 首页>>代码示例>>C#>>正文


C# HTTPRequestHandle类代码示例

本文整理汇总了C#中HTTPRequestHandle的典型用法代码示例。如果您正苦于以下问题:C# HTTPRequestHandle类的具体用法?C# HTTPRequestHandle怎么用?C# HTTPRequestHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


HTTPRequestHandle类属于命名空间,在下文中一共展示了HTTPRequestHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetHTTPRequestHeaderValue

		/// <summary>
		/// <para> Set a request header value for the request, must be called prior to sending the request.  Will</para>
		/// <para> return false if the handle is invalid or the request is already sent.</para>
		/// </summary>
		public static bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, string pchHeaderValue) {
			InteropHelp.TestIfAvailableClient();
			using (var pchHeaderName2 = new InteropHelp.UTF8StringHandle(pchHeaderName))
			using (var pchHeaderValue2 = new InteropHelp.UTF8StringHandle(pchHeaderValue)) {
				return NativeMethods.ISteamHTTP_SetHTTPRequestHeaderValue(hRequest, pchHeaderName2, pchHeaderValue2);
			}
		}
开发者ID:jtsadlerjr,项目名称:Steamworks.NET,代码行数:11,代码来源:isteamhttp.cs

示例2: SetHTTPRequestGetOrPostParameter

		/// <summary>
		/// <para> Set a GET or POST parameter value on the request, which is set will depend on the EHTTPMethod specified</para>
		/// <para> when creating the request.  Must be called prior to sending the request.  Will return false if the</para>
		/// <para> handle is invalid or the request is already sent.</para>
		/// </summary>
		public static bool SetHTTPRequestGetOrPostParameter(HTTPRequestHandle hRequest, string pchParamName, string pchParamValue) {
			InteropHelp.TestIfAvailableGameServer();
			using (var pchParamName2 = new InteropHelp.UTF8StringHandle(pchParamName))
			using (var pchParamValue2 = new InteropHelp.UTF8StringHandle(pchParamValue)) {
				return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestGetOrPostParameter(hRequest, pchParamName2, pchParamValue2);
			}
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:12,代码来源:isteamgameserverhttp.cs

示例3: GetHTTPResponseHeaderValue

 public static bool GetHTTPResponseHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, byte[] pHeaderValueBuffer, uint unBufferSize)
 {
     InteropHelp.TestIfAvailableGameServer();
     bool result;
     using (InteropHelp.UTF8StringHandle uTF8StringHandle = new InteropHelp.UTF8StringHandle(pchHeaderName))
     {
         result = NativeMethods.ISteamGameServerHTTP_GetHTTPResponseHeaderValue(hRequest, uTF8StringHandle, pHeaderValueBuffer, unBufferSize);
     }
     return result;
 }
开发者ID:GameDiffs,项目名称:TheForest,代码行数:10,代码来源:SteamGameServerHTTP.cs

示例4: SetHTTPRequestHeaderValue

        public bool SetHTTPRequestHeaderValue(HTTPRequestHandle request, string headerName, string headerValue)
        {
            CheckIfUsable();

            using (NativeString nativeHeaderName = new NativeString(headerName))
            {
                using (NativeString nativeHeaderValue = new NativeString(headerValue))
                {
                    return NativeMethods.HTTP_SetHTTPRequestHeaderValue(request.AsUInt32, nativeHeaderName.ToNativeAsUtf8(), nativeHeaderValue.ToNativeAsUtf8());
                }
            }
        }
开发者ID:das-etwas,项目名称:Ludosity-s-Steamworks-Wrapper,代码行数:12,代码来源:HTTP.cs

示例5: GetHTTPStreamingResponseBodyData

		/// <summary>
		/// <para> Gets the body data from a streaming HTTP response given a handle from HTTPRequestDataReceived_t. Will return false if the</para>
		/// <para> handle is invalid or is to a non-streaming response (meaning it wasn't sent with SendHTTPRequestAndStreamResponse), or if the buffer size and offset</para>
		/// <para> do not match the size and offset sent in HTTPRequestDataReceived_t.</para>
		/// </summary>
		public static bool GetHTTPStreamingResponseBodyData(HTTPRequestHandle hRequest, uint cOffset, byte[] pBodyDataBuffer, uint unBufferSize) {
			InteropHelp.TestIfAvailableGameServer();
			return NativeMethods.ISteamGameServerHTTP_GetHTTPStreamingResponseBodyData(hRequest, cOffset, pBodyDataBuffer, unBufferSize);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:9,代码来源:isteamgameserverhttp.cs

示例6: GetHTTPResponseBodySize

		/// <summary>
		/// <para> Gets the size of the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the</para>
		/// <para> handle is invalid.</para>
		/// </summary>
		public static bool GetHTTPResponseBodySize(HTTPRequestHandle hRequest, out uint unBodySize) {
			InteropHelp.TestIfAvailableGameServer();
			return NativeMethods.ISteamGameServerHTTP_GetHTTPResponseBodySize(hRequest, out unBodySize);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:8,代码来源:isteamgameserverhttp.cs

示例7: ISteamGameServerHTTP_SetHTTPRequestRequiresVerifiedCertificate

		public static extern bool ISteamGameServerHTTP_SetHTTPRequestRequiresVerifiedCertificate(HTTPRequestHandle hRequest, [MarshalAs(UnmanagedType.I1)] bool bRequireVerifiedCertificate);
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs

示例8: SetHTTPRequestNetworkActivityTimeout

		/// <summary>
		/// <para> Set a timeout in seconds for the HTTP request, must be called prior to sending the request.  Default</para>
		/// <para> timeout is 60 seconds if you don't call this.  Returns false if the handle is invalid, or the request</para>
		/// <para> has already been sent.</para>
		/// </summary>
		public static bool SetHTTPRequestNetworkActivityTimeout(HTTPRequestHandle hRequest, uint unTimeoutSeconds) {
			InteropHelp.TestIfAvailableGameServer();
			return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestNetworkActivityTimeout(hRequest, unTimeoutSeconds);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:9,代码来源:isteamgameserverhttp.cs

示例9: GetHTTPRequestWasTimedOut

		/// <summary>
		/// <para> Check if the reason the request failed was because we timed it out (rather than some harder failure)</para>
		/// </summary>
		public static bool GetHTTPRequestWasTimedOut(HTTPRequestHandle hRequest, out bool pbWasTimedOut) {
			InteropHelp.TestIfAvailableGameServer();
			return NativeMethods.ISteamGameServerHTTP_GetHTTPRequestWasTimedOut(hRequest, out pbWasTimedOut);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:7,代码来源:isteamgameserverhttp.cs

示例10: SetHTTPRequestRequiresVerifiedCertificate

		/// <summary>
		/// <para> Set that https request should require verified SSL certificate via machines certificate trust store</para>
		/// </summary>
		public static bool SetHTTPRequestRequiresVerifiedCertificate(HTTPRequestHandle hRequest, bool bRequireVerifiedCertificate) {
			InteropHelp.TestIfAvailableGameServer();
			return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestRequiresVerifiedCertificate(hRequest, bRequireVerifiedCertificate);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:7,代码来源:isteamgameserverhttp.cs

示例11: SetHTTPRequestCookieContainer

		/// <summary>
		/// <para> Set the cookie container to use for a HTTP request</para>
		/// </summary>
		public static bool SetHTTPRequestCookieContainer(HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer) {
			InteropHelp.TestIfAvailableGameServer();
			return NativeMethods.ISteamGameServerHTTP_SetHTTPRequestCookieContainer(hRequest, hCookieContainer);
		}
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:7,代码来源:isteamgameserverhttp.cs

示例12: SetHTTPRequestHeaderValue

		// Set a request header value for the request, must be called prior to sending the request.  Will
		// return false if the handle is invalid or the request is already sent.
		public static bool SetHTTPRequestHeaderValue(HTTPRequestHandle hRequest, string pchHeaderName, string pchHeaderValue) {
			InteropHelp.TestIfAvailableClient();
			return NativeMethods.ISteamHTTP_SetHTTPRequestHeaderValue(hRequest, pchHeaderName, pchHeaderValue);
		}
开发者ID:konsordo,项目名称:Steamworks.NET-Test,代码行数:6,代码来源:isteamhttp.cs

示例13: SetHTTPRequestRawPostBody

		// Sets the body for an HTTP Post request.  Will fail and return false on a GET request, and will fail if POST params
		// have already been set for the request.  Setting this raw body makes it the only contents for the post, the pchContentType
		// parameter will set the content-type header for the request so the server may know how to interpret the body.
		public static bool SetHTTPRequestRawPostBody(HTTPRequestHandle hRequest, string pchContentType, byte[] pubBody, uint unBodyLen) {
			InteropHelp.TestIfAvailableClient();
			return NativeMethods.ISteamHTTP_SetHTTPRequestRawPostBody(hRequest, pchContentType, pubBody, unBodyLen);
		}
开发者ID:konsordo,项目名称:Steamworks.NET-Test,代码行数:7,代码来源:isteamhttp.cs

示例14: GetHTTPResponseBodyData

		// Gets the body data from a HTTP response given a handle from HTTPRequestCompleted_t, will return false if the
		// handle is invalid or is to a streaming response, or if the provided buffer is not the correct size.  Use BGetHTTPResponseBodySize first to find out
		// the correct buffer size to use.
		public static bool GetHTTPResponseBodyData(HTTPRequestHandle hRequest, byte[] pBodyDataBuffer, uint unBufferSize) {
			InteropHelp.TestIfAvailableClient();
			return NativeMethods.ISteamHTTP_GetHTTPResponseBodyData(hRequest, pBodyDataBuffer, unBufferSize);
		}
开发者ID:konsordo,项目名称:Steamworks.NET-Test,代码行数:7,代码来源:isteamhttp.cs

示例15: ISteamHTTP_SetHTTPRequestContextValue

		public static extern bool ISteamHTTP_SetHTTPRequestContextValue(HTTPRequestHandle hRequest, ulong ulContextValue);
开发者ID:xulinqs,项目名称:Steamworks.NET,代码行数:1,代码来源:NativeMethods.cs


注:本文中的HTTPRequestHandle类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。