inne informatyczne

 0    1 flashcard    jaroosh
tải về mp3 In chơi tự kiểm tra
 
câu hỏi język polski câu trả lời język polski
Jak stworzyc samo hostujacy sie server HTTP?
bắt đầu học
HttpSelfHostServer
using System; using System. IO; using System. Web. Http; using System. Web. Http. SelfHost; var address = "http://localhost: 8080"; var conf = new HttpSelfHostConfiguration(new Uri(address)); conf. Routes. MapHttpRoute(name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new {id = RouteParameter. Optional}); var server = new HttpSelfHostServer(conf); server. OpenAsync(). Wait(); Console. WriteLine("Listening..."); Console. ReadKey();

Bạn phải đăng nhập để đăng bình luận.