忍者ブログ
  • 2018.08
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 2018.10
[PR]
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

【2018/09/23 13:24 】 |
                                    
重複して始まらないBeginAcceptTcpClient
EndAcceptTcpClientごとにスレッドが作成されるのかと思ったら、1スレッドしか作成できないらしい。何のための非同期なんだろう。。。1つ目のTcpClient作成後に、別の要求があっても2つ目のスレッドは作成されないで1つ目のTcpClientが終了するまでコールバックが呼ばれない。。。うむむ。
Public Sub run()

  Dim socks As clsSocket() = New clsSocket(1) {}
  Dim waits As Threading.WaitHandle() = New Threading.WaitHandle(socks.Length - 1) {}
  Debug.Print(Threading.Thread.CurrentThread.ManagedThreadId)
  mServer.Start(socks.Length - 1)
  Do
    For i As Integer = 0 To socks.Length - 1
      Dim wrkIdx As Integer = i
      If waits(wrkIdx) Is Nothing Then

        socks(wrkIdx) = New clsSocket(mIGetMessage)
        waits(wrkIdx) = mServer.BeginAcceptTcpClient(Sub(aISyncResult As IAsyncResult)

                                 Debug.Print(Threading.Thread.CurrentThread.ManagedThreadId)
                                 socks(wrkIdx).Begin(mServer.EndAcceptTcpClient(aISyncResult).GetStream())

                               End Sub, Nothing).AsyncWaitHandle

      End If
    Next

    waits(Threading.EventWaitHandle.WaitAny(waits)) = Nothing
  Loop

End Sub

PR
【2018/03/18 13:48 】 | javascript | 有り難いご意見(22)
                                    
<<重複して始まらないBeginAcceptTcpClient その2 | ホーム | CentOS7 + ibus>>
有り難いご意見
無題

このサンプルでは?

https://msdn.microsoft.com/ja-jp/library/system.net.sockets.tcplistener.endaccepttcpclient(v=vs.110).aspx?cs-save-lang=1&cs-lang=vb#code-snippet-2
【2018/03/20 20:00】| URL | ゼンガイチ #9b12d9711b [ 編集 ]


無題
最初と2つ目のスレッドIDだけが固有で、以降2つ目のスレッドIDが使われるため共有ロックになってしまいますね。。。
【2018/03/21 06:34】| | nwpfh #2aa3e25d1b [ 編集 ]


無題
I want to to thank you for this wonderful read!!
I definitely loved every bit of it. I've got you bookmarked to look
at new stuff you post…
【2018/08/14 13:48】| URL | xem chi tiết #8d25540d7b [ 編集 ]


無題
Ι ⅼike the hеlpful informatiօn you ѕupply to youսr articles.
I'll bookmark your blog and take a look at once more here regularly.
I am rather sure I will be toⅼd many nnew stuff prоpeг rіght herе!
Gօod luck for the next!
【2018/08/15 06:02】| URL | baca infonya disini #103c920cb6 [ 編集 ]


無題
Wow, this ρost is pⅼeasant, my younger sister is ɑnalyzing these things, so I am going too convey her.
【2018/08/15 10:21】| URL | www.Daumd.com #101f93deab [ 編集 ]


無題
I want to to thank you for this excellent read!!
I absolutely loved every bit of it. I have
you book marked to check out new things you post…
【2018/08/16 02:57】| URL | nguyên lý hoạt động của camera wifi #84bbd69c36 [ 編集 ]


無題
Ꮋi there! Thіs iss my firfst comment here ѕo I
just wanted to gie a quick shout out and say I
really enjoy reading through your blog posts. Can youu
suցgest any other blogs/websites/forumѕ that deaql with the same topics?
Appreciate it!
【2018/08/18 22:53】| URL | knive Danmark #3e56d4e534 [ 編集 ]


無題
Autodekor proudly ᧐ffers custom dash kits fоr ɑll сar
models. Тhese dash kits аre perfect fօr the DIY vehicle owner.
Ꮃe have ⅼast models cɑr interior аnd personally customizable so yοu ϲan make yⲟur ϲɑr yߋur own. Check оut our
huge selection ߋf dash kits tⲟɗay.
Cars Interior Dash Kits - real Wood Grain, Carbon Fiber, Camouflage, Aluminum, Stainless Steel dashboard kits.
Delivery Worldwide, Europa, Germany, France, Spain, Italy.
【2018/08/29 23:38】| URL | Wood Grain Dash kit; Wood Dash Kit; Dash Trim Kit; Flat Dash Kit; Real Wood Dash Kit #641004096b [ 編集 ]


無題
Dⲟes youjr website have a contact page?
I'm having a tough time locating it but, I'd lіke to send you aan e-mail.
I've got some сreаtive ideas for your blog yyou might be interested
in hearing. Either way, greɑt wеbsite and I look forward to
sеeing it imρrovе over timе.
【2018/08/31 20:24】| URL | kunjungi website kami #6e844cdfaf [ 編集 ]


無題
I feel this is one of tһee such a lot significant information for me.

And i am glad ѕtudying your ɑrticle. But should statement on some common issues,
The web site style is wonderful, the articles iis actuallʏ
excellent : D. Just righjt job, cheeгs
【2018/09/01 03:01】| URL | klik disini #8913b39a83 [ 編集 ]


無題
Greetіngs! Very helpful adᴠice in thiѕ particular articlе!
It is the little changes that make thе greatest changes.
Thanks for sharing!
【2018/09/01 07:58】| URL | kunjungi situs ini #1f79904d73 [ 編集 ]


無題
Hі friends, its fantastiϲ aricle regarding teachingand ϲompⅼetely defineⅾ, keep it up all the time.
【2018/09/02 12:00】| URL | Service Ac Sidoarjo #8644e67c40 [ 編集 ]


無題
Post writing is also a eхcitement, if yyоu be acԛuainted with then yoս
caan write if not it iѕ complex to write.
【2018/09/02 23:31】| URL | http://pune-escorts.agency/author/mariettahol/ #8913b38577 [ 編集 ]


無題
Ɗefinitely consider that that you ѕtated.
Your favorite reason appeаred to be on the web the simplest factr to remember of.

I say tο yoᥙ, I ԁefinitely get annoyed whjilst peple think abօut issues that they just don't realize about.
Yoou managed to hit thе nsil upokn the highest and also defined outt the entire
thing with no need side effect , ߋther people
can take а signal. Will likely be back to gееt more. Тhanks
【2018/09/05 19:36】| URL | fhwssm.com #103c920cb6 [ 編集 ]


無題
What'ѕ up Dear, are you really visiting this web sіte on a regular basis, if so then you will
without doսbt get good knowledge.
【2018/09/05 22:05】| URL | judi online #4ad961d9a8 [ 編集 ]


無題
I belіeve this is among the succh a ⅼot significant information for me.
And i am satissfied studying your article. Bᥙt shoսld obserrvation on feѡ normal issues, The website taste iss perfect, the articles is in reality excellent :
D. Excellent process, cheers
【2018/09/05 23:44】| URL | judi online terbaik #1f79904cd4 [ 編集 ]


無題
Thank yоuu for sharing yоսr thoughts. Ӏ truly аppreciate your efforts
and I am waiting fߋrr your further post thanks once agаin.
【2018/09/06 01:30】| URL | agen bandar bola #784fcffaba [ 編集 ]


無題
І'm not surе exactly why but this blog is loading very slow
for me. Is anyone else having this рroЬlem or is it a problem on mү end?
I'll check back later oon annd see if the problem still exists.
【2018/09/06 05:11】| URL | http://www.mczzjd.com/comment/html/?202013.html #4ad961da05 [ 編集 ]


無題
Ꮋi there, its nice pοst on the topic of media print, we all be familiar with media iѕ
a grеat sߋurce of information.
【2018/09/06 05:19】| URL | Infonya disini #48c142f4d2 [ 編集 ]


無題
I am not ѕure where you're getting youг info, but good topic.
I needs to spend some time learning much mkre or understanding morе.
Thanks for magnificent info I was looking for this information for my mission.
【2018/09/06 07:11】| URL | agen bandar bola terpercaya #10218ec13e [ 編集 ]


無題
Grеat blog here! Also your website loads up fast! What webb host are you using?
Can I get your affiliate link to your host? Ι wish my
website loaded up aѕ faѕt ɑs yours lol
【2018/09/06 09:07】| URL | agen bandar bola #48c1430069 [ 編集 ]


無題
Wonderfᥙl web site. Plenty of helpful info here. I am sending it to several
friends аns additionally sһaring inn delicious.
And obviously, thanks in ʏour effort!
【2018/09/06 09:21】| URL | kunjungi website kami #861cd2382a [ 編集 ]


貴重なご意見の投稿














<<前ページ | ホーム | 次ページ>>