remoting을 WCF로 대체하려면 어떤 biding이 사용됩니까? 우리는 공유 dll을 사용하여 remoting에서 두 개의 응용 프로그램이 메시지를 보냈습니다. WCF에서이 작업을 수행하는 방법바인딩이 Remoting 대안으로 WCF에서 사용됨
1
A
답변
1
답변은 인프라에 따라 다릅니다. 서비스가 모두 동일한 시스템에있는 경우 NetNamedPipeBinding
을 사용할 수 있습니다. 서비스와 소비자가 다른 시스템에있는 경우 NetTcpBinding
또는 BasicHttpBinding
을 사용할 수 있습니다.
1
This solved my purpose...
private const int RF_TESTMESSAGE = 0xA123;
const int WM_USER = 0x0400;
const int WM_CUSTOM_MESSAGE = WM_USER + 0x0001;
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern int SendMessage(IntPtr hwnd, [MarshalAs(UnmanagedType.U4)] int Msg, IntPtr wParam, int lParam);
public FormVideoApp()
{
InitializeComponent();
lblProcID.Text = string.Format("This process ID: {0}", Process.GetCurrentProcess().Id);
}
private void button1_Click(object sender, EventArgs e)
{
//get this running process
Process proc = Process.GetCurrentProcess();
//get all other (possible) running instances
//Process[] processes = Process.GetProcessesByName(proc.ProcessName);
Process[] processes = Process.GetProcessesByName("Application");
int numberToSend = 1500;
string str = string.Empty;
str = "start";
switch (str)
{
case "start":
numberToSend = 101;
break;
case "stop":
numberToSend = 102;
break;
case "error":
numberToSend = 103;
break;
}
if (processes.Length > 0)
{
//iterate through all running target applications
foreach (Process p in processes)
{
if (p.Id != proc.Id)
{
//now send the RF_TESTMESSAGE to the running instance
//SendMessage(p.MainWindowHandle, RF_TESTMESSAGE, IntPtr.Zero, IntPtr.Zero);
SendMessage(p.MainWindowHandle, WM_CUSTOM_MESSAGE, IntPtr.Zero, numberToSend);
}
}
}
else
{
MessageBox.Show("No other running applications found.");
}
}
protected override void WndProc(ref Message message)
{
//filter the RF_TESTMESSAGE
if (message.Msg == WM_CUSTOM_MESSAGE)
{
int numberReceived = (int)message.LParam;
string str=string.Empty;
//Do ur job with this integer
switch (numberReceived)
{
case 101: str = "start";
break;
case 102: str = "stop";
break;
case 103: str = "error";
break;
}
this.listBox1.Items.Add(str + "Received message RF_TESTMESSAGE");
}
else
{
base.WndProc(ref message);
}
////filter the RF_TESTMESSAGE
//if (message.Msg == RF_TESTMESSAGE)
//{
// //display that we recieved the message, of course we could do
// //something else more important here.
// this.listBox1.Items.Add("Received message RF_TESTMESSAGE");
//}
//be sure to pass along all messages to the base also
//base.WndProc(ref message);
}
관련 문제
- 1. 안전한 대안으로 mod_rewrite
- 2. 플래시의 대안으로 Xcode
- 3. 아마존 리눅스에 대한 대안으로
- 4. 클래스 대안으로 Jquery 선택
- 5. div를 iframe의 대안으로 사용하기
- 6. Remoting 또는 wcf service..which가 더 빠릅니까?
- 7. GCC : C 표준이 사용됨
- 8. rtime 압축이 jffs2에서 사용됨
- 9. napi가 수신에 사용됨
- 10. FormType 엔티티 : 이미 사용됨
- 11. C3P0 maxPoolSize 사용됨
- 12. typedef struct 정의에 사용됨
- 13. LISP가 파이썬에서 사용됨
- 14. 레일이 부분적이지만 여러보기에서 사용됨
- 15. "-"NUnit의 [Category] 이름에 사용됨
- 16. 바인딩이
- 17. .Net Remoting 질문
- 18. Akka remoting 및 Heroku
- 19. Remoting (서버 측)
- 20. Remoting 및 OSGi
- 21. iPhone Grails remoting 옵션
- 22. .Net Remoting call delay
- 23. WCF를 통한 .NET Remoting?
- 24. .NET Remoting 자습서
- 25. Remoting - 객체가 원격입니까?
- 26. Flash Remoting 및 Java
- 27. JBoss AS7.1.1 remoting
- 28. .NET Remoting 규약
- 29. 테스팅 Hessian remoting-servlet.xml
- 30. Spring Remoting - HTTP Invoker